You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered some strange behaviour with editing a polygon. It seems to be tied to having the draw mode "initialized" with "draw.add". When you try to edit the polygon and drag a vertex, it is never "cleared" from the frame and is layered on the last frame so you see bunch of vertices layered while dragging around.
Enter your Mapbox API Access Token at the top to make the code run.
You should see polygons for Brazil.
Double click on one of the polygons to allow it to be edited.
Drag one of the vertices.
OR
Steps 1-3: Same as above.
4. Click on the "Create Polygon" button in the top-right corner.
5. Draw a new polygon, this is added to the Brazil set of polygons.
6. Double click on your new polygon to allow it to edited.
7. Drag one of the vertices.
Expected Behavior
The polygon should be able to be edited freely and smoothly.
Actual Behavior
The vertices and the polygon are never "redrawn" and "cleared" so you see a jagged bunch of vertices bunch up until you release and click off of the polygon.
The text was updated successfully, but these errors were encountered:
jackwkinsey
changed the title
Editing a polygon that has been added to map with draw.add has some add lagging behaviour.
Editing a polygon that has been added to map with draw.add has some odd lagging behaviour.
May 8, 2018
Thanks for the issue @jackwkinsey. The problem here is that Draw does not correctly support numeric ids. If you can confirm #769 fixes your problem, I can merge that PR and get this out the door.
I've encountered some strange behaviour with editing a polygon. It seems to be tied to having the draw mode "initialized" with "draw.add". When you try to edit the polygon and drag a vertex, it is never "cleared" from the frame and is layered on the last frame so you see bunch of vertices layered while dragging around.
Dragging a vertex
mapbox-gl-js version: 0.44.2
mapbox-gl-draw version: 1.0.4
Steps to Trigger Behavior
OR
Steps 1-3: Same as above.
4. Click on the "Create Polygon" button in the top-right corner.
5. Draw a new polygon, this is added to the Brazil set of polygons.
6. Double click on your new polygon to allow it to edited.
7. Drag one of the vertices.
Expected Behavior
The polygon should be able to be edited freely and smoothly.
Actual Behavior
The vertices and the polygon are never "redrawn" and "cleared" so you see a jagged bunch of vertices bunch up until you release and click off of the polygon.
The text was updated successfully, but these errors were encountered: