Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
bad15cc8
Commit
bad15cc8
authored
Dec 11, 2014
by
csillag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Annotator to 6623b2c2 (typed-packaging branch)
parent
3ab5ceaa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
45 deletions
+20
-45
annotator.js
h/static/scripts/vendor/annotator.js
+9
-17
annotator.pdf.js
h/static/scripts/vendor/annotator.pdf.js
+4
-4
annotator.store.js
h/static/scripts/vendor/annotator.store.js
+5
-9
annotator.texthighlights.js
h/static/scripts/vendor/annotator.texthighlights.js
+2
-15
No files found.
h/static/scripts/vendor/annotator.js
View file @
bad15cc8
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-6
da826
c
** Annotator 1.2.6-dev-6
623b2
c
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-1
1-21 11:06:29
Z
** Built at: 2014-1
2-11 01:33:32
Z
*/
...
...
@@ -1205,9 +1205,7 @@
Annotator
.
prototype
.
_scan
=
function
()
{
var
_this
=
this
;
if
(
!
this
.
domMapper
)
{
this
.
_chooseAccessPolicy
();
}
this
.
_chooseAccessPolicy
();
try
{
this
.
pendingScan
=
this
.
domMapper
.
scan
();
}
catch
(
_error
)
{
...
...
@@ -1426,18 +1424,15 @@
};
Annotator
.
prototype
.
setupAnnotation
=
function
(
annotation
)
{
var
anchor
,
exception
,
pageIndex
,
result
,
t
,
_base
,
_k
,
_l
,
_len2
,
_ref1
,
_ref2
,
_ref3
,
_ref4
;
var
anchor
,
exception
,
pageIndex
,
result
,
t
,
_base
,
_k
,
_l
,
_len2
,
_ref1
,
_ref2
,
_ref3
,
_ref4
,
_ref5
;
if
(
annotation
.
target
==
null
)
{
annotation
.
target
=
this
.
selectedTargets
;
}
this
.
selectedTargets
=
[];
if
(
annotation
.
target
==
null
)
{
throw
new
Error
(
"Can not run setupAnnotation(). No target or selection available."
);
}
annotation
.
anchors
=
[];
_ref
1
=
annotation
.
target
;
for
(
_k
=
0
,
_len2
=
_ref
1
.
length
;
_k
<
_len2
;
_k
++
)
{
t
=
_ref
1
[
_k
];
_ref
2
=
(
_ref1
=
annotation
.
target
)
!=
null
?
_ref1
:
[]
;
for
(
_k
=
0
,
_len2
=
_ref
2
.
length
;
_k
<
_len2
;
_k
++
)
{
t
=
_ref
2
[
_k
];
try
{
result
=
this
.
createAnchor
(
annotation
,
t
);
anchor
=
result
.
result
;
...
...
@@ -1448,7 +1443,7 @@
t
.
diffHTML
=
anchor
.
diffHTML
;
t
.
diffCaseOnly
=
anchor
.
diffCaseOnly
;
annotation
.
anchors
.
push
(
anchor
);
for
(
pageIndex
=
_l
=
_ref
2
=
anchor
.
startPage
,
_ref3
=
anchor
.
endPage
;
_ref2
<=
_ref3
?
_l
<=
_ref3
:
_l
>=
_ref3
;
pageIndex
=
_ref2
<=
_ref3
?
++
_l
:
--
_l
)
{
for
(
pageIndex
=
_l
=
_ref
3
=
anchor
.
startPage
,
_ref4
=
anchor
.
endPage
;
_ref3
<=
_ref4
?
_l
<=
_ref4
:
_l
>=
_ref4
;
pageIndex
=
_ref3
<=
_ref4
?
++
_l
:
--
_l
)
{
if
((
_base
=
this
.
anchors
)[
pageIndex
]
==
null
)
{
_base
[
pageIndex
]
=
[];
}
...
...
@@ -1458,7 +1453,7 @@
}
}
catch
(
_error
)
{
exception
=
_error
;
console
.
log
(
"Error in setupAnnotation for"
,
annotation
.
id
,
":"
,
(
_ref
4
=
exception
.
stack
)
!=
null
?
_ref4
:
exception
);
console
.
log
(
"Error in setupAnnotation for"
,
annotation
.
id
,
":"
,
(
_ref
5
=
exception
.
stack
)
!=
null
?
_ref5
:
exception
);
}
}
return
annotation
;
...
...
@@ -1509,9 +1504,6 @@
};
clone
=
annotations
.
slice
();
if
(
annotations
.
length
)
{
if
(
!
this
.
domMapper
)
{
this
.
_scan
();
}
if
(
this
.
pendingScan
!=
null
)
{
this
.
pendingScan
.
then
(
function
()
{
return
setTimeout
(
function
()
{
...
...
h/static/scripts/vendor/annotator.pdf.js
View file @
bad15cc8
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-
18d8f72
** Annotator 1.2.6-dev-
6623b2c
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-12-
08 17:27:52
Z
** Built at: 2014-12-
11 01:33:35
Z
*/
...
...
@@ -18,12 +18,12 @@
// Generated by CoffeeScript 1.6.3
(
function
()
{
var
PDFTextMapper
,
_ref
,
var
_ref
,
__bind
=
function
(
fn
,
me
){
return
function
(){
return
fn
.
apply
(
me
,
arguments
);
};
},
__hasProp
=
{}.
hasOwnProperty
,
__extends
=
function
(
child
,
parent
)
{
for
(
var
key
in
parent
)
{
if
(
__hasProp
.
call
(
parent
,
key
))
child
[
key
]
=
parent
[
key
];
}
function
ctor
()
{
this
.
constructor
=
child
;
}
ctor
.
prototype
=
parent
.
prototype
;
child
.
prototype
=
new
ctor
();
child
.
__super__
=
parent
.
prototype
;
return
child
;
};
PDFTextMapper
=
(
function
(
_super
)
{
window
.
PDFTextMapper
=
(
function
(
_super
)
{
__extends
(
PDFTextMapper
,
_super
);
PDFTextMapper
.
isPDFDocument
=
function
()
{
...
...
h/static/scripts/vendor/annotator.store.js
View file @
bad15cc8
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-
9e0eff3
** Annotator 1.2.6-dev-
6623b2c
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-
09-25 22:40:57
Z
** Built at: 2014-
12-11 01:33:34
Z
*/
...
...
@@ -101,13 +101,9 @@
Store
.
prototype
.
annotationDeleted
=
function
(
annotation
)
{
var
_this
=
this
;
if
(
__indexOf
.
call
(
this
.
annotations
,
annotation
)
>=
0
)
{
if
(
annotation
.
_clientdeleteonly
!=
null
)
{
return
this
.
unregisterAnnotation
(
annotation
);
}
else
{
return
this
.
_apiRequest
(
'destroy'
,
annotation
,
(
function
()
{
return
_this
.
unregisterAnnotation
(
annotation
);
}));
}
return
this
.
_apiRequest
(
'destroy'
,
annotation
,
(
function
()
{
return
_this
.
unregisterAnnotation
(
annotation
);
}));
}
};
...
...
h/static/scripts/vendor/annotator.texthighlights.js
View file @
bad15cc8
// Generated by CoffeeScript 1.6.3
/*
** Annotator 1.2.6-dev-9
e0eff3
** Annotator 1.2.6-dev-9
5b7a09
** https://github.com/okfn/annotator/
**
** Copyright 2012 Aron Carroll, Rufus Pollock, and Nick Stenning.
** Dual licensed under the MIT and GPLv3 licenses.
** https://github.com/okfn/annotator/blob/master/LICENSE
**
** Built at: 2014-
09-25 22:40:5
9Z
** Built at: 2014-
12-03 11:41:0
9Z
*/
...
...
@@ -91,19 +91,6 @@
return
r
;
};
TextHighlight
.
prototype
.
_highlightRanges
=
function
(
normedRanges
,
cssClass
)
{
var
highlights
,
r
,
_i
,
_len
;
if
(
cssClass
==
null
)
{
cssClass
=
'annotator-hl'
;
}
highlights
=
[];
for
(
_i
=
0
,
_len
=
normedRanges
.
length
;
_i
<
_len
;
_i
++
)
{
r
=
normedRanges
[
_i
];
this
.
$
.
merge
(
highlights
,
this
.
_highlightRange
(
r
,
cssClass
));
}
return
highlights
;
};
function
TextHighlight
(
anchor
,
pageIndex
,
normedRange
)
{
TextHighlight
.
__super__
.
constructor
.
call
(
this
,
anchor
,
pageIndex
);
TextHighlight
.
_init
(
this
.
annotator
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment