mapbox / mapbox/mapbox-gl-draw

Finished modes are not returning to defaultMode

Open
#780 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
JavaScript
Stars
1.1k
Forks
612
Avg merge
8d 9h
Merged PRs (30d)
5

Description

**mapbox-gl-js version**: 0.45.0
**mapbox-gl-draw version**: 1.0.9

### Steps to Trigger Behavior
1. Set default mode to something other than `simple_select`
2. Draw a point with `draw_point`
3. Once finished, the new mode will be `simple_select`

### Expected Behavior
The finished modes should return to defaultMode, not to `simple_select`

### Actual Behavior
The finished modes are hard coded to return to `simple_select` and not to default mode.

The only way to fix this is to fork the repo, or to copy all the modes from source to the project's folders and change it there.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the finished drawing modes and their transition back to simple_select. Verify how defaultMode is configured, then update the completion behavior so it returns to that configured mode and confirm that point drawing no longer selects simple_select when another default is set.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.