// ...
setPersistentAttributes: function (memento) {
this._super(memento)
// ...
// remove all children created in the init method
//
this.resetChildren()
// and restore all children of the JSON document instead.
//
memento.children.forEach((e) => {
let locator = eval("new " + e.locator + "()")
if(e.locatorAttr) {
locator.attr(e.locatorAttr)
}
let child = eval("new " + e.child + "()")
child.setPersistentAttributes(e)
this.add(child, locator)
})
return this
Proposed fix in draw2d/src/shape/node/Node.js: getPersistentAttributes: function () { let memento = this._super()
},
// ... setPersistentAttributes: function (memento) { this._super(memento)
}