Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Programmatically deleting a node after its dragged

$
0
0

@jc78 wrote:

This is part two of my previous question which I figured out. This part however I'm still stumped.

I have a diagram listener, "ExternalObjectsDropped", that is called when I drag a node into my diagram from a Palette next to it..

In response to that newly dragged node, I've created a new node and I want to delete the dragged node. But using diagram.model.removeNodeData causes errors: "Do not replace a Diagram.model while a transaction is in progress."

Essentially, I just want this first node for representative rendering purposes as the node is being dragged from the palette onto the diagram. Once the node is dropped, I'd like to actually replace it with a different node type.

Is there anyway to prevent the dragged node from actually being created in the data model but still create the other node type in its place?

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles