From 1a62e5925b891833e93228d6ef36d036bf55cad3 Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Fri, 18 Mar 2016 13:10:07 +0100 Subject: [PATCH] fix(Modeler): clear ids on destroy --- lib/Modeler.js | 4 ++++ 1 file changed, 4 insertions(+) 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);