Is there a way to get to the parent Node
or the parent GraphObject
's in general in GoJS? I'm inside a TextBlock
and need access to the model data in the click handler. Panel.findObject(id)
only works from top to botton in the object hierarchy and a TextBlock
has no access to that method either way.
I tried diagram.findNodeForKey
, if I get access to the key from the child element, but same problem here. I thought there has to be a simple way to get to the parent `Node/Part somehow, but I didn't find any suitable function for that in the API.
As a workaround I use diagram.selection.first().data
at the moment to get to the Node and the bound model data, it works in my case, but seems a little dirty.