Open rmsmq opened 6 years ago
@rmsmq - Thanks for submitted this bug report. The draw.create
doesn't mark the end of the mode and it looks like you found a bug where draw_point
fails to clean up its state if you move from draw_point
to draw_point
. Figuring out how to fix this is going to take some time so if you can use the draw.modechange
event rather than the draw.create
event you should be fine.
mapbox-gl-js version: 0.45.0 mapbox-gl-draw version: 1.0.9
Steps to Trigger Behavior
Use plunker below; https://plnkr.co/x3R0TtHsNGzxPxAOL7HH
draw.create
event fires and console.logs the feature, and the current mode.draw_point
to continue drawing points (does not work)Expected Behavior
Based on the documentation - https://github.com/mapbox/mapbox-gl-draw/blob/master/docs/API.md#modes
Expect the
Draw.mode
to transition tosimple_select
and that you can change the mode back todraw_point
to continue drawing points.Actual Behavior
The mode is still in
draw_point
and you can not draw another point.