freegroup / draw2d

Create Visio like drawings, diagrams or workflows with JavaScript and HTML5
https://freegroup.github.io/draw2d/#/examples
MIT License
738 stars 227 forks source link

Port Promise Reject issue in canvas.getSelection().getPrimary() #163

Open pa-solution2020 opened 3 years ago

pa-solution2020 commented 3 years ago

I faced one issue when I get selected Node or Figure from Canvas according mouse event. It's working properly before I add new port manually like this.

node.addPort(new draw2d.HybridPort().setName('xxx'), new draw2d.layout.locator.XYRelPortLocator(85.5,0));

Successfully port added but I'm facing this issue after added ports. If I select this Node, getSelectedNode function returning correct Object for twice. After that, this returning object which is including "Promise rejected" ports.

Screenshot from 2021-03-04 23-22-30

Hope your kind help. Thanks