Issue with Link route being reused

Allowing a user to dynamically create nodes, and then create a dynamic route (using PolylineLinkingTool) by dragging away from node 1, I’m seeing some strange behavior when this is done more than once.

After adding two nodes wherever a user clicks, user creates a poly link like usual (drags from node, clicks along route, connects to end node). LinkDrawn event is fired. Store link/nodes in db. Clear all nodes and links just created using this.theModel.removeLinkDataCollection(linkCollection); and this.theModel.removeNodeDataCollection(nodeCollection); (these are the link and two nodes created previously). User adds two more nodes and attempts to link with a new shape. Dragging from the first node, the route immediately upon initial drag appears to be identical in shape(number of vertices, general direction) of the link drawn for the last connection.

Is there something I should be doing to clear the points along the route of a previously deleted node/link? Why would the diagram/model remember the shape of the previous route when trying to draw a new route?

Thanks!

K

I can’t reproduce that at Polyline Linking Tool.

But I think the answer should be to add an override, PolylineLinkingTool.doDeactivate that clears the points in the LinkingBaseTool.temporaryLink. That temporary Link stores the Points where the user clicks.