Open jrmie opened 5 years ago
@Jrmie Thanks for the nice visualisation. As far as I know this is not possible, yet :disappointed:
I tried to modify this function in vis.js, but I don't know how to declare and define the x_offset attribute.
(0, _createClass3['default'])(StraightEdge, [{
key: '_line',
value: function _line(ctx, values) {
// draw a straight line
ctx.beginPath();
ctx.moveTo(this.fromPoint.x, this.fromPoint.y);
var deltaX;
if (this.toPoint.x_offset === undefined || this.toPoint.x_offset === null) {
deltaX = 0;
}
else {
deltaX = this.toPoint.x_offset;
window.alert(deltaX);
}
ctx.lineTo(this.toPoint.x + deltaX, this.toPoint.y);
// draw shadow if enabled
this.enableShadow(ctx, values);
ctx.stroke();
this.disableShadow(ctx, values);
}
Is it possible to add edge options to set position of the tail and the head instead of the node center? In graphviz, edge attributes
headport
andtailport
allow to set position of the edge on the node's border with cardinal points.The second edge is an example of what I would like to display.