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

linkValidation and port text binding

$
0
0

@JanU wrote:

Hi,

I need to create a validation that checks if out port text is the same as in port text.

My ports are defined in nodeTemplate as:
$(go.TextBlock,
{stroke: "black", alignment: go.Spot.Center, editable: true, isMultiline: false},
new go.Binding("text", "lname"))

and on the screen I can populate lname - all works fine. Then I link the validation function:
diagram.toolManager.linkingTool.linkValidation = sameName;

function sameName(fromnode, fromport, tonode, toport) {
[...]

The problem is: how do I access the lname text value from fromport and toport parameters?
Debugger does not revel this question, I also couldn't find any similar example in tutorials.

Thanks!
Jan

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7002

Trending Articles