draw2d icon indicating copy to clipboard operation
draw2d copied to clipboard

extends function not set with jason reader

Open hbagheri opened this issue 2 years ago • 1 comments

Thank you for your grate Library

i've added draw2d.Connection.extend to show a right click menu for connections It works properly while create a new connection but not works if the connection was loaded from a saved JSON. would you please help me to solve my problem

hbagheri avatar Apr 08 '22 06:04 hbagheri

if your read/write JSON from your drawd2d diagram, it is important that all elements has the attribute NAME. This attribute is use late to create JS object instances. https://github.com/freegroup/draw2d/blob/master/examples/connection_with_contextmenu/MyConnection.js#L12

If this attribute exists, the constructor of your Connection class is correct called and the coding for the cotext menue is executed.

https://freegroup.github.io/draw2d/#/examples/connection_with_contextmenu

freegroup avatar Apr 10 '22 15:04 freegroup