Well that wasn't so hard :)
Here it is (only for horizontal spacetree, guess you can add the other
one if you want):
'orthogonal:horizontal': function(adj, canvas) {
var level_distance = this.viz.config.levelDistance,
orn = this.getOrientation(adj),
nodeFrom = adj.nodeFrom,
nodeTo = adj.nodeTo,
rel = nodeFrom._depth < nodeTo._depth,
begin = this.viz.geom.getEdge(rel? nodeFrom:nodeTo, 'begin',
orn),
end = this.viz.geom.getEdge(rel? nodeTo:nodeFrom, 'end', orn);
canvas.path('stroke', function(ctx) {
ctx.moveTo(begin.x, begin.y);
ctx.lineTo(end.x-level_distance/2, begin.y);
});
canvas.path('stroke', function(ctx) {
ctx.moveTo(end.x-level_distance/2, begin.y);
ctx.lineTo(end.x-level_distance/2, end.y);
});
canvas.path('stroke', function(ctx) {
ctx.moveTo(end.x-level_distance/2, end.y);
ctx.lineTo(end.x, end.y);
});
},
Thanks for the help! Getting the grips of this.
On Jun 8, 12:18 am, Frans Twisk <
fr...@scissor.nl> wrote:
> Thanks, It's hard to find something if you don't have the right name
> for it ;-)
>
> I found a solution for a vertical spaceetree here:
http://groups.google.com/group/javascript-information-visualization-t...