[FEAT] Let remove all overlays of several BPMN elements at once #2577
Labels
BPMN diagram overlays
Overlays: positioning, shapes, functionality
enhancement
New feature or request
Milestone
Is your feature request related to a problem? Please describe.
Currently, in version
0.32.0
, we can remove all overlays of one single element.When an application needs to remove overlays of several BPMN elements, it must loop over a list of ids.
So, the application integrating
bpmn-visualization
must keep track of this ids where it previously added overlays.As in #2576, this is particularly overwhelming when the application needs to clean the whole overlays to restore the default rendering, or propose a complete different visualization. For instance, to switch from a monitoring view to a conformance view.
We already see the loop cleanup in several repositories of the Process Analytics project:
bpmn-visualization-js/dev/public/static/js/elements-identification.js
Line 58 in 94cef15
bpmn-visualization-js/dev/public/static/js/elements-identification.js
Line 79 in 94cef15
Describe the solution you'd like
Update the existing API to remove all overlays on a single element, several elements or all elements (full cleanup).
Switch from
to
Calling the method without argument will remove all overlays on all elements.
This signature matches the
removeAllCssClasses
signature (see #2576).Additional context
Passing an empty array or an empty string should have no effect. See #2900
The text was updated successfully, but these errors were encountered: