Improve ruler button toggle#1801
Conversation
|
Please provide screenshots before and after. |
|
I don't know if this design makes sense. Current one is the standard MapLibre uses for all controls. For example drawing controls. |
|
I would have thought it falls under the Maplibre toggle interactions, which was why I initially did it with eventListeners, but it didn't quite maintain your established theme. From a user experience perspective, it provides visual clarity with the action. The other map controls also provide some visual clarity with pop-out fields dialogs etc. Seemingly trivial interactions like this, can contribute to the overall user experience. |
|
Not sure I understand the point you're trying to make. There's already a selected state. |
|
Maybe I am missing something, but what is the selected state difference? All of the map controls, with the exception of the ruler button, provide feedback to the user when the button has been selected (e.g. switcher -> map selection pop-up and geocoder -> search pop-up). The ruler button provides no feedback to the user when it is selected. This PR provides that feedback, for when the button has been selected. I hope that makes a bit more sense? |





Purpose: The map ruler button is difficult to identify when it is active or inactive, as the colour difference between the two states is very similar.
Solution: This PR implements a distinct colour change between inactive state; black on white (default icon colour) and active state; white on black (reversed icon colour). This PR also supports eliminating touch screen hover stickiness for mobile devices.