Is there a way to highlight all ports that are available to be linked from/to given the state of a tool?
For instance, I want to highlight all available fromPorts on the diagram. Once I select one, I want to highlight all available toPorts which match a certain criteria. This would be managed through my ClickLinkingTool I’ve created.
I’ve gone through several examples that demonstrate the highlighting of connected nodes and links, however, this is not what I want to do.
So, in theory, I should be able to iterate over all the nodes in the diagram, and then all the ports on each node and change background/stroke/whatever on every port that matches my criteria?
export class Node extends Part {
...
/**This read-only property returns an iterator over all of the GraphObjects in this node that act as ports.*/
ports: Iterator<GraphObject>;
}
Edit: I guess I could coerce the type to be a Shape since it’s a derived class of GraphObject.