How to stop link rerouting

Hi Walter,

Not sure if we are going in the expected solution path. I’m facing an issue with ghost nodes: when a node is dragged from the Palette, it disappears upon entering the main canvas, making it hard to determine the exact drop location. This may stem from our GoJS configuration or framework gaps.

As we near release and haven’t pinpointed the root cause, we’re exploring workarounds. Our current focus is to identify the drop target—whether it’s a node, link, or the canvas. Currently, we use event.diagram.selection.first().position to get the drop location, but this isn’t always accurate, especially when a node is dropped on a link (since the link reroutes automatically).

Our use cases for dropping nodes are:

  1. On Canvas: Add the node as an orphan.
  2. On a Node: Replace the existing node.
  3. On a Link: Insert the new node between linked nodes.

We’ve implemented the logic for these cases but struggle to reliably detect the exact link for case 3. Could you suggest any alternative workarounds or ways to prevent link rerouting in this scenario?

Thanks!