From 926643fddff9c143e4176ff03766d1c276793d05 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 24 Oct 2022 17:29:40 +0200 Subject: [PATCH] refactor: remove unused MutationObserver code (#75) This was a start for an implementation that was supposed to fix the remove of custom additions in the SVG nodes. They were removed when doing diagram navigation. This implementation was not finished and as we are removing the diagram navigation there is no need for such fixes. --- src/index.js | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/index.js b/src/index.js index 6344c0c..20ac96c 100644 --- a/src/index.js +++ b/src/index.js @@ -32,26 +32,3 @@ configureButtons(mainBpmnVisualization); const footer = document.querySelector("footer"); const version = mainBpmnVisualization.getVersion(); footer.innerText = `bpmn-visualization@${version.lib}`; - - -/*TO BE IMPLEMENTED -observe navigation and zooming and -update circle ripples and linearGradient if they were added*/ - -var containerBpmn = document.querySelector("#main-bpmn-container"); - -var containerObserver = new MutationObserver(function (mutations) { - mutations.forEach(function (mutation) { - if (mutation.type === "attributes") { - //check if ripple circles exist - //if yes, recall ripple function - //check if Gradient exists - //if yes, re-add them - } - }); -}); - -containerObserver.observe(containerBpmn, { - attributes: true, //configure it to listen to attribute changes - attributeFilter: ["min-width", "min-height"] // filter your attributes -});