@RoWie wrote:
Running gojs 2.0 on ubuntu.
I’ve modified the ContinuousForceDirectedLayout example as follows: when a node is clicked, the layouter switches and for each node an n.move() is performed relative to the clicked node:
…
if (!clickedNode) {
// now perform the normal layout
go.ForceDirectedLayout.prototype.doLayout.call(this, coll);
} else {
this.diagram.nodes.each(function(n) {
var pt = new go.Point(…);
n.move(pt);
});
this.isValidLayout=true;
}
…The move is performed OK, but a lot of the links between the nodes do not point to the middle of a node, but are ‘misplaced’: the are connected to the correct node, but point to an arbitrary point inside the node.
could you advise me how to fix this?
Posts: 1
Participants: 1
