Closed fpuga closed 4 years ago
@fpuga Thanks for reporting. This is already on my TODO list also I will close this Issue and add it to the feature requests where users can upvote this request.
This is released with the Version 2.8.0. Call map.pm.Toolbar.setButtonDisabled(name, Boolean)
Is there any recommend way to dinamically disable a button (or a mode) in the Toolbar.
I have an entity that can have or not a polygon geometry. This geometry will never be a multipolygon. If it has a geometry it is the only editable layer in the map.
I want all the available buttons visible in the map
But enable/disable while still visible, after user actions.
AFAIK, i can modify the css getting the buttons with
but i'm not sure about the correct approach to handle the "click" action. Maybe it could be a new feature directly supported by Geoman.
Currently what i'm doing is something like