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

Update adjacent nodes when links are added/modified/deleted

$
0
0

@Dominic.Lerbs wrote:

Hello,

we want to display nodes differently (e.g. different background color) depending on their incoming and outgoing links.
So for example if a node has a link with category=categoryA it should have a blue background and in case of category=categoryB a yellow background.

First I thought I could bind the node’s background to a property and update this property whenever the linkDataArray is modified.
However, the documentation says I shouldn’t update the model from within the change listener (while a transaction is still active) (please correct me if I am wrong, cannot find the part of the doc where I’ve read this currently)

The only other option I can think of is to modify the adjacent nodes of the modified/removed/added link directly from the change listener.

Is there a better way?

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles