diff --git a/lib/Modeler.js b/lib/Modeler.js index 0343f79e..f0919238 100644 --- a/lib/Modeler.js +++ b/lib/Modeler.js @@ -108,6 +108,10 @@ function Modeler(options) { this._collectIds(event.definitions, event.context); } }, this); + + this.on('diagram.destroy', function() { + this.moddle.ids.clear(); + }, this); } inherits(Modeler, Viewer);