Skip to content

Commit

Permalink
refactor: remove unused MutationObserver code (#75)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tbouffard committed Oct 24, 2022
1 parent 755c3c1 commit 926643f
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

0 comments on commit 926643f

Please sign in to comment.