The .active class on the draw buttons can't be used to indicate to the user that they are in drawing mode — e.g. by changing the color of the button — because clicking the draw button a second time does not cancel drawing mode.
Click the polygon button (note in the inspector that the button gets an .active class)
Click the polygon button again (note the .active class is removed)
Draw a polygon on the map
Expected Behavior
If clicking the draw button toggles its .active class, the draw mode should also be toggled. The active class should be used to indicate to the user that they are in drawing mode.
Actual Behavior
Clicking the draw button toggles its .active class but does not toggle drawing mode. So the active class can't be used to indicate drawing mode.
The
.active
class on the draw buttons can't be used to indicate to the user that they are in drawing mode — e.g. by changing the color of the button — because clicking the draw button a second time does not cancel drawing mode.Steps to Trigger Behavior
.mapbox-gl-draw_polygon
button.active
class).active
class is removed)Expected Behavior
If clicking the draw button toggles its
.active
class, the draw mode should also be toggled. The active class should be used to indicate to the user that they are in drawing mode.Actual Behavior
Clicking the draw button toggles its
.active
class but does not toggle drawing mode. So the active class can't be used to indicate drawing mode.mapbox-gl-js version: 0.40.1 mapbox-gl-draw version: 1.0.2