Skip to content

Commit

Permalink
Fix problem with setRoot() + "arrow" edges - verify that the edge's c…
Browse files Browse the repository at this point in the history
…hild-parent relationship is correct,
  • Loading branch information
yaron-gilboa committed Nov 1, 2011
1 parent bc31d54 commit cfb8676
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Visualizations/Spacetree.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1494,9 +1494,10 @@ $jit.ST.Plot.EdgeTypes = new Class({
var orn = this.getOrientation(adj), var orn = this.getOrientation(adj),
node = adj.nodeFrom, node = adj.nodeFrom,
child = adj.nodeTo, child = adj.nodeTo,
rel = (node._depth < child._depth),
dim = adj.getData('dim'), dim = adj.getData('dim'),
from = this.viz.geom.getEdge(node, 'begin', orn), from = this.viz.geom.getEdge((rel?node:child), 'begin', orn),
to = this.viz.geom.getEdge(child, 'end', orn), to = this.viz.geom.getEdge((rel?child:node), 'end', orn),
direction = adj.data.$direction, direction = adj.data.$direction,
inv = (direction && direction.length>1 && direction[0] != node.id); inv = (direction && direction.length>1 && direction[0] != node.id);
this.edgeHelper.arrow.render(from, to, dim, inv, canvas); this.edgeHelper.arrow.render(from, to, dim, inv, canvas);
Expand Down

0 comments on commit cfb8676

Please sign in to comment.