mapbox / mapbox/mapbox-gl-draw

Allow the user to delete the last point while drawing a line or polygon.

Open
#559 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Most drawing tools allow the user to delete the last point while actively drawing a line or polygon.

Currently the delete key and escape removes the entire line or polygon.

Ideally, this new feature would just use the delete key to remove the last point.
If the delete key is repeatedly hit then each subsequent point would be removed until the whole drawing is removed.

This would then still leave the escape key to remove the entire drawing.

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 from the active drawing interaction and the current Delete and Escape keyboard behavior described in the issue. Done means Delete removes only the most recent point on an active line or polygon, repeated presses remove earlier points until the drawing is empty, and Escape still removes the entire drawing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.