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

Properties of Locators are not serialized or cloned #181

Open rudolphi opened 3 years ago

rudolphi commented 3 years ago

Proposed fix in draw2d.layout.locator.Locator: clone: function () { let clone = eval("new " + this.NAME + "();") clone.attr(this.attr()) // also clone properties return clone } (will not work if the legacy constructor of XYRelPortLocator is used, but let's stay pragmatic)