-
Notifications
You must be signed in to change notification settings - Fork 600
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map.on('draw.update', callback) does not fire consistently #684
Comments
Opened plunker and received error: api.mapbox.com/styles/v1/mapbox/streets-v9?access_token=pk.eyJ1Ijoic2t5d2F0Y2hhcHBzIiwiYSI6ImNpa3B4aHp6OTE1OWV0bm02aWQwOTd2OG8ifQ.Ic8z13iLo4r39I01ckGvZA Failed to load resource: the server responded with a status of 401 (Unauthorized) |
Updated Plunker with new key. Sorry about that |
moved different points about 20 times. all fired. may you clarify the scenario? may be screencast? |
I have provided a screencast to better demonstrate the issue. You can skip to about 19 seconds in for the updating to start. Here are a list of time codes for missed events: I hope that the screen capture better illustrates the issue. I am not sure how to provide more detail other than to share the screen capture and note that while I am able to easily reproduce the issue, there is no specific pattern observed for when the event doesn't fire. Please let me know if the screen capture helped or if I can be of any more help in tracking down this bug. I appreciate the help |
can not reproduce. just have guess that it due to some async operations. may be you move point before processing of previous event finished. I don't know MapBoxDraw internals. So it based only on experience. |
I am experiencing this as well, running on version 1.0.2 in Chrome 61.0.3163.100 for MacOS. The issue seems to be intermittent and difficult to reproduce predictably. When it does happen, no |
|
I can confirm this issue as well. Works fine for me in Chrome but on mobile the Update: |
I am experiencing this issue as well, running version I'm able to reproduce it by creating a polygon in the plunkr in the original post, and then moving it around with my mouse. Every so often, the update event does not fire when I move the polygon. |
I stumbled across this issue when testing the mobile browser side of things (desktop seemed consistent) and ran into the exact same scenario @bloigge described. I ultimately ended up having to wrap my logic in a 'touchend' event and pass all my draw logic within. |
I can reproduce the problem. It seems to happen in
|
I can reproduce this problem 100% of the time on an Android mobile device, and also in Chrome's mobile simulator. This is with the latest version of mapbox-gl-draw: 1.1.1, and version 0.51.3 of mapbox-gl. Steps to reproduce:
I have verified the problem on Chrome 66 and 72 on an Android device, and also Chrome 72 in the device simulator. Important note: moving individual points does fire draw.update. The problem only exists when moving the entire shape. |
I am also facing this issue on a macOS computer with a trackpad (Chrome). |
I made a fork of the v1.4.1 with fix and prepare command. You can try it:
|
is this in "main" now? I'm still having this kind of issue... |
@stepankuzmin I can reproduce the problem. It seems to happen in mapbox-gl-draw 1.4.1 |
Hi @Maximenya, We haven't yet released a new version of Mapbox GL Draw that includes this fix. Sorry for the inconvenience. |
When will you release the fixed version? Why wait so long to release a bug fix? |
hello, please tell me why when I install the latest version of your package there is no src folder but only dist. i can't update ''mapbox-gl-draw-freehand-mode'' under your update because of this |
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? |
Same problem. Testing on v1.4.2 |
Wondering if anyone else is still experiencing this and if there's any fix for it? Thanks. |
Works better, but still with problems on 1.4.3. |
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
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.The text was updated successfully, but these errors were encountered: