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
9cb1e597
Commit
9cb1e597
authored
Apr 24, 2013
by
csillag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partial fix for #379 (in Annotator). Waiting for site to update code before closing..
parent
268dd070
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
annotator.js
h/lib/annotator.js
+13
-5
No files found.
h/lib/annotator.js
View file @
9cb1e597
/*
** Annotator 1.2.6-dev-
052235
5
** Annotator 1.2.6-dev-
e666b0
5
** 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: 2013-04-2
3 15:06:28
Z
** Built at: 2013-04-2
4 10:16:24
Z
*/
(
function
()
{
...
...
@@ -102,11 +102,12 @@
$
.
fn
.
xpath
=
function
(
relativeRoot
)
{
var
jq
;
jq
=
this
.
map
(
function
()
{
var
elem
,
idx
,
path
;
var
elem
,
idx
,
path
,
tagName
;
path
=
''
;
elem
=
this
;
while
(
elem
&&
elem
.
nodeType
===
1
&&
elem
!==
relativeRoot
)
{
idx
=
$
(
elem
.
parentNode
).
children
(
elem
.
tagName
).
index
(
elem
)
+
1
;
tagName
=
elem
.
tagName
.
replace
(
":"
,
"
\\
:"
);
idx
=
$
(
elem
.
parentNode
).
children
(
tagName
).
index
(
elem
)
+
1
;
idx
=
"["
+
idx
+
"]"
;
path
=
"/"
+
elem
.
tagName
.
toLowerCase
()
+
idx
+
path
;
elem
=
elem
.
parentNode
;
...
...
@@ -1206,7 +1207,14 @@
var
container
,
range
,
selector
,
target
,
_k
,
_len3
,
_ref2
;
this
.
mouseIsDown
=
false
;
if
(
this
.
ignoreMouseup
)
return
;
this
.
selectedTargets
=
this
.
getSelectedTargets
();
try
{
this
.
selectedTargets
=
this
.
getSelectedTargets
();
}
catch
(
exception
)
{
console
.
log
(
"Error while checking selection:"
);
console
.
log
(
exception
.
stack
);
alert
(
"There is something very strange about the current selection. Sorry, but I can not annotate this."
);
return
;
}
_ref2
=
this
.
selectedTargets
;
for
(
_k
=
0
,
_len3
=
_ref2
.
length
;
_k
<
_len3
;
_k
++
)
{
target
=
_ref2
[
_k
];
...
...
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