Skip to content

Commit

Permalink
Handle multiple leaf nodes correctly #85
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Dec 6, 2016
1 parent 66fc42d commit 515cfb8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion flat/style/flat.viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,14 @@ function treenode(annotation) {
}
}
} else {
node.children.push({'label':getspantext(annotation,false)}); //add leaf node with word text
var targets = sort_targets(annotation.scope);
targets.forEach(function(target){
forannotations(target,function(annotation2){
if ((annotation2.type == "t") && (annotation2.class == "current")) {
node.children.push({'label':annotation2.text}); //add leaf node with word text
}
});
});
}
return node;
}
Expand Down

0 comments on commit 515cfb8

Please sign in to comment.