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

Highlighting the same item in different tables

$
0
0

@marin wrote:

I’m trying to have shared objects between different nodes, where each node has an item array template defined.
Now, what I want is to have the same objects, but maybe different arrays in the node data.
E.g.
Node1: has data.items = [objA, objB, objC];
Node2: has data.items = [objA, objC];

Let’s say each object is 1 row in a node.
What I would like is that if an item is selected on one node, the selection is reflected on the other, and the row is highlighted on both nodes.
The only way I found that this can be done is with: diagram.updateAllTargetBindings() but that seems inefficient.
For some reason diagram.model.updateTargetBindings(item.data, '') doesn’t work. I assume that this is the result of the arrays being assigned different hash ids.

Is ther any more efficient solution to my use case? I could iterate over all the nodes, but that also seems slow for large diagrams. Also, I didn’t notice that there are any diagram event that might make this more efficient.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles