Closed madupuis closed 3 years ago
Pull request https://github.com/projectstorm/react-diagrams/pull/725 has a little bit of discussion about this.
If you need port name to not be unique, maybe you should just generate an UUID for the name and create a custom property on your Port to use as the name.
As @renato-bohler has stated, I probably should have called that id
instead of name
since the port names are supposed to be unique. The important thing is that name
in this case is an internal library thing, it doesnt have to be the display name of the port. If a custom display name for a port is required, extend the port model and add the additional fields you require.
In PortModel :
==> This will cause model to break if several nodes have the same name. This can happen if the node name can be set by the user. All maps shoud be indexed on ID and not name.