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

How to let "isHighlighted" event bind the data from nodeDataArray?

$
0
0

@Kevin68 wrote:

I am new to goJs. I've got one simple question: the original code is: new go.Binding("fill", "nodeColor"). It works fine. But if I change it to "new go.Binding("fill", "isHighlighted", function(h) { return h ? "red" : "nodeColor"; }).ofObject()), I got an unexpected result. How can i make it happen? Thanks!

{ stroke: "darkblue", strokeWidth: 1,
minSize: new go.Size(156, 156) },

//old code , it works.
//new go.Binding("fill", "nodeColor")), //the original code, it works well

//new code, it doesn't work.
new go.Binding("fill", "isHighlighted", function(h) { return h ? "red" : "nodeColor"; }).ofObject()),

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles