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

Ports are broken for draw2d.shape.analog.* after serialize/deserialize to JSON #179

Open rudolphi opened 3 years ago

rudolphi commented 3 years ago

As no class name for the custom MyInputPortLocator/MyOutputPortLocator subclasses is serialized, only dummy "Class.extend" objects are created during deserialization. The probably best solution would be to just serialize the node IDs of these ports, so that the IDs can be put back during deserialization, to maintain connections, etc.