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

How to bind to link color?

$
0
0

@marin wrote:

I tried to make a binding on the link "stroke" property, but I keep getting:
Binding error: undefined target property: stroke on Link#6989

How can I bind to the link, color, this is my template:

 $(go.Link, {

                selectable: true,
                relinkableFrom: true,
                relinkableTo: true
            },
            new go.Binding('stroke', '', value => {

                console.log(value)
                return value ? 'red' : 'black'
            }).ofObject(),
            $(go.Shape, {strokeWidth: 3}),
            $(go.Shape, {toArrow: 'standard'}));

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles