mapbox / mapbox/mapbox-gl-draw
Draw_polygon mode: polygon disappear when clicking twice on the first or second point
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
**mapbox-gl-js 2.14.1:
**mapbox-gl-draw 1.4.1:
### Steps to Trigger Behavior
1. Go to https://docs.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
2. Click on the map to draw a polygon
3. Click once again on the same point (it happens when you click twice in a raw on the first or second point)
### Expected Behavior
One of the following two expected behaviour:
* The polygon is removed and the user can draw a new polygon
* The point is removed and the user can continue drawing
### Actual Behavior
The polygon disappear and the user can’t draw a new polygon. It can only drag the map
https://github.com/mapbox/mapbox-gl-draw/assets/16925256/a4ca34bb-5b59-445b-8de6-ed5b2bab763b
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the linked Mapbox GL Draw example by clicking twice on the first or second polygon point. Start by tracing the draw_polygon mode's handling of repeated clicks; done means the polygon is removed or the point is removed while drawing can continue, rather than leaving the map in a non-drawing state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100