Closed stefan-sl closed 2 years ago
Hi @stefan-sl,
Thank you for the detailed repro!
Yes, I see the issue and will fix it in the next release by firing a delete
event on each marker removed. Need to let it "marinate" for a couple of days and think if it won't cause any negative side-effects.
Our implementation of markerjs2 relies on the marker-level events dispatched from the MarkerArea. We've recently added the clear all markers button and there is no final delete or deselect event when you clear all the markers. Using example here: https://codesandbox.io/s/marker-js-2-freehand-from-the-start-forked-gww8j8?file=/src/index.js
To reproduce:
In our implementation we are relying on these events to determine if other context menus should show/hide. Because the last event dispatched on delete all is 'select' we cannot accurately determine how to configure our menus because 'select' implies that a marker is still selected when that is not true.
Is it possible to either dispatch a 'delete' event or another new event when all markers are cleared?