Permalink
Browse files

Fix problem with setRoot() + "arrow" edges - verify that the edge's c…

…hild-parent relationship is correct,
  • Loading branch information...
1 parent bc31d54 commit cfb8676adba6f8cd0f109eea6179a85105e30a72 @yaron-gilboa yaron-gilboa committed Nov 1, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 Source/Visualizations/Spacetree.js
@@ -1494,9 +1494,10 @@ $jit.ST.Plot.EdgeTypes = new Class({
var orn = this.getOrientation(adj),
node = adj.nodeFrom,
child = adj.nodeTo,
+ rel = (node._depth < child._depth),
dim = adj.getData('dim'),
- from = this.viz.geom.getEdge(node, 'begin', orn),
- to = this.viz.geom.getEdge(child, 'end', orn),
+ from = this.viz.geom.getEdge((rel?node:child), 'begin', orn),
+ to = this.viz.geom.getEdge((rel?child:node), 'end', orn),
direction = adj.data.$direction,
inv = (direction && direction.length>1 && direction[0] != node.id);
this.edgeHelper.arrow.render(from, to, dim, inv, canvas);

0 comments on commit cfb8676

Please sign in to comment.