Leaflet / Leaflet.toolbar

Flexible, extensible toolbars for Leaflet maps.
MIT License
197 stars 70 forks source link

Create a method for post-initialization addition of new Actions #51

Open jywarren opened 5 years ago

jywarren commented 5 years ago

In https://github.com/publiclab/Leaflet.DistortableImage/issues/141 we're discussing how to make our toolbars easier to modify during more complex UI interactions, and would like to be able to add or remove Actions from the toolbar at runtime. Would we be able to run, for example, something like:

toolbar.addAction(...);
toolbar.removeAction(...);

Thanks, love to hear others' thoughts on this!