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
6be1b3f3
Commit
6be1b3f3
authored
May 31, 2013
by
Ujvari Gergely
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #230
parent
8d6710e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
threading.coffee
h/js/plugin/threading.coffee
+4
-1
jwz.js
h/lib/jwz.js
+7
-0
No files found.
h/js/plugin/threading.coffee
View file @
6be1b3f3
...
...
@@ -21,7 +21,10 @@ class Annotator.Plugin.Threading extends Annotator.Plugin
# Attach the thread to its parent, if any.
if
annotation
.
references
?
.
length
prev
=
annotation
.
references
[
annotation
.
references
.
length
-
1
]
@
annotator
.
threading
.
getContainer
(
prev
).
addChild
thread
if
annotation
.
created
?
@
annotator
.
threading
.
getContainer
(
prev
).
addChild
thread
else
@
annotator
.
threading
.
getContainer
(
prev
).
addChildToPos
thread
,
0
# Expose the thread to the annotation
Object
.
defineProperty
annotation
,
'thread'
,
...
...
h/lib/jwz.js
View file @
6be1b3f3
...
...
@@ -73,6 +73,12 @@
return
top
;
}
function
addChildToPos
(
child
,
pos
)
{
if
(
child
.
parent
)
child
.
parent
.
removeChild
(
child
);
this
.
children
.
splice
(
pos
,
0
,
child
);
child
.
parent
=
this
;
}
function
addChild
(
child
)
{
if
(
child
.
parent
)
child
.
parent
.
removeChild
(
child
);
this
.
children
.
push
(
child
);
...
...
@@ -104,6 +110,7 @@
getSpecificChild
:
getSpecificChild
,
threadParent
:
threadParent
,
addChild
:
addChild
,
addChildToPos
:
addChildToPos
,
removeChild
:
removeChild
,
hasDescendant
:
hasDescendant
}
...
...
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