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

Diagram.nodes contains phantom nodes when adding a link

$
0
0

@Dominic.Lerbs wrote:

Hi,
I have a ModelChangedListener to execute some logic when a link is added:
(e.change === go.ChangedEvent.Insert && e.propertyName === "linkDataArray")

Within this listener, the diagram.nodes array contains 4 elements, even though my model and nodeDataArray only contains two nodes. The diagram.parts also contains only 2 elements.

I tried to find out what the two additional nodes are, but they have no name, no size and no data.

Do you know what these two phantom-nodes could be and has this changed since goJS 1? I get an error now because I am accessing node.data which is undefined for the phantom nodes. The same code has worked before but I am not sure if this is related to the goJS upgrade or some side effect of my other code.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles