From 759920fbc867f0ae35de6f7cb3b6715db35651c4 Mon Sep 17 00:00:00 2001 From: Thomas Bouffard <27200110+tbouffard@users.noreply.github.com> Date: Mon, 24 Oct 2022 15:03:26 +0200 Subject: [PATCH] refactor: remove unused MutationObserver code 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 107f52b..3699b68 100644 --- a/src/index.js +++ b/src/index.js @@ -33,26 +33,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 -});