Hi there, loving GoJS!
I’m working on a prototype that is much similar to the Org Chat example.
From the example you get
nodeContainer.mouseDrop = function (e, node) {
const diagram = node.diagram;
// #TODO - Support more than 1 node
const selNode = diagram.selection.first();
if (mayWorkFor(selNode, node)) {
// find any existing link into the selected node
const link = selNode.findTreeParentLink();
if (link !== null) {
// reconnect any existing link
link.fromNode = node;
} else {
// else create a new link
diagram.toolManager.linkingTool.insertLink(
node,
node.port,
selNode,
selNode.port
);
}
}
};
which animates and works well. By animate, I mean the nodes gracefully reposition themselves.
Where as if I run that code but in my own custom function (not the mouseDrop click handler), it just triggers a refresh/flicker as oppose to the nice graceful repositioning animation.
I’m curious as to if this a known behavior?