You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a generic, reusable MapLibre component that provides a plugin API. It also integrates draw functionality, which exposes the draw library (currently Mapbox Draw, soon to be Terra Draw) via that API. The main component needs to know when the draw mode changes, so as to highlight the button for the current mode. In addition to those buttons, any plugin can also change the mode directly, so it would be ideal to have an event that is published when the mode changes.
Describe your proposed idea for the solution to this problem
A simple mode change event that can be subscribed to via the on() function.
Describe alternatives you've considered
I'm currently monkey-patching the setMode() function to be able to monitor for mode changes. This is not ideal.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have a generic, reusable MapLibre component that provides a plugin API. It also integrates draw functionality, which exposes the draw library (currently Mapbox Draw, soon to be Terra Draw) via that API. The main component needs to know when the draw mode changes, so as to highlight the button for the current mode. In addition to those buttons, any plugin can also change the mode directly, so it would be ideal to have an event that is published when the mode changes.
Describe your proposed idea for the solution to this problem
A simple mode change event that can be subscribed to via the on() function.
Describe alternatives you've considered
I'm currently monkey-patching the setMode() function to be able to monitor for mode changes. This is not ideal.
The text was updated successfully, but these errors were encountered: