Then I call a function on-click which draws a new process and add overlays there (i DO NOT leave the page).
However - the old overlays seems not to be romved correctly in this case. Do I have to call some overlays.removeAll()? Or do I somehow need to âcleanupâ some divs or the like before painting a new model?
We do a viewer.importXML(data.bpmn20Xml, function(err) {
and call that again to show a new process. However, overlays do not get cleared in all cases. Do I understand correctly that this is a bug then? What is the best way to move on - trying to isolate a small example making it reproducible i guess (not sure how easy this is).
If there is a dedicated clearOverlay method I would like to try this first, could be much less effort
// remove by id
var overlayId = overlays.add(...);
overlays.remove(overlayId);
// remove by element and/or type
overlays.remove({ element: 'SCAN_OK' });