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

How to get go.Shape portId in onClick event

$
0
0

@dramxx wrote:

Hello, Im willing to validate connection between 2 ports and Im having hard time detecting which port I clicked on, hopefully you can shed some light on it.

Situation is:

  • Im dropping nodes from palette ( go.GraphObject.make(go.Palette… ) on canvas ( go.GraphObject.make(go.Diagram… )

  • each node is added into NodeTemplateMap, depending on node category I call portFactory function, which draws ports with particular params ( go.Shape objects )

  • each port object has onClick function which should console.log portId of that port

Im attaching below portFactory code, with my attempts.

https://pastebin.com/raw/j95ySNTd

Thank you for any suggestions

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles