projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.45k stars 1.16k forks source link

Changing port name in runtime? #934

Closed rzfzr closed 2 years ago

rzfzr commented 2 years ago

635 did not help me (nodeModel.inPorts[0].getOptions.name ='new name')

How can it be done?

Also, inside my project de/serialization is not an option.

Thanks

rzfzr commented 2 years ago

Found it, must change the label aswell

      this.props.nodeModel.getInPorts()[1].getOptions().name = 'this is it'
      this.props.nodeModel.getInPorts()[1].getOptions().label = 'this is it'