mapbox-gl-draw: map.on('draw.update', callback) does not fire consistently
mapbox-gl-js version: v0.39.1, v0.38.0, v0.37.0 mapbox-gl-draw version: v1.0.0, 0.19.0
Steps to Trigger Behavior
- Open Plunkr: https://plnkr.co/edit/Rn5AZKlDrdBBAQmdiRy2?p=preview
- Open Dev Tools -> Console
- Draw a polygon
- Update the polygon by moving a point
- Repeat step 4 and keep track of the number of times you have moved a point. After a few changes you should notice that the count variable does not represent the number of changes actually made.
Expected Behavior
The draw.update event callback should fire each time a point is moved to a new position. Which in turn would increment the count variable by one.
Actual Behavior
The draw.update event callback is not being fired consistently.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 6
- Comments: 23 (6 by maintainers)
Commits related to this issue
- Fix 'simple_select' mode lacking 'touchend' event (#684) — committed to corinv/mapbox-gl-draw by corinv 4 years ago
- Fix 'simple_select' mode lacking 'touchend' event (#684) (#1008) Co-authored-by: Vladimir Agafonkin <agafonkin@gmail.com> — committed to mapbox/mapbox-gl-draw by corinv 3 years ago
I made a fork of the v1.4.1 with fix and prepare command. You can try it:
When will you release the fixed version? Why wait so long to release a bug fix?
Works better, but still with problems on 1.4.3.
I tried locally to apply #1160 but I’m still able to reproduce the problem by following @Maximenya instructions:
Anyone else also facing this issue even after applying the fix?