Commit daa14376 authored by Randall Leeds's avatar Randall Leeds

Revert "Fixes #230"

This reverts commit a359ca6d0b7f0e2fc96782b5267a8af2536d9b1d.
parent 6be1b3f3
...@@ -21,10 +21,7 @@ class Annotator.Plugin.Threading extends Annotator.Plugin ...@@ -21,10 +21,7 @@ class Annotator.Plugin.Threading extends Annotator.Plugin
# Attach the thread to its parent, if any. # Attach the thread to its parent, if any.
if annotation.references?.length if annotation.references?.length
prev = annotation.references[annotation.references.length-1] prev = annotation.references[annotation.references.length-1]
if annotation.created? @annotator.threading.getContainer(prev).addChild thread
@annotator.threading.getContainer(prev).addChild thread
else
@annotator.threading.getContainer(prev).addChildToPos thread, 0
# Expose the thread to the annotation # Expose the thread to the annotation
Object.defineProperty annotation, 'thread', Object.defineProperty annotation, 'thread',
......
...@@ -73,12 +73,6 @@ ...@@ -73,12 +73,6 @@
return top; 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) { function addChild(child) {
if(child.parent) child.parent.removeChild(child); if(child.parent) child.parent.removeChild(child);
this.children.push(child); this.children.push(child);
...@@ -110,7 +104,6 @@ ...@@ -110,7 +104,6 @@
getSpecificChild: getSpecificChild, getSpecificChild: getSpecificChild,
threadParent: threadParent, threadParent: threadParent,
addChild: addChild, addChild: addChild,
addChildToPos: addChildToPos,
removeChild: removeChild, removeChild: removeChild,
hasDescendant: hasDescendant hasDescendant: hasDescendant
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment