mapbox / mapbox/mapbox-gl-draw

How to style the individually selected handles?

Open
#1,072 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

As far as I understand, a line can have two style properties: either the line is selected, or it's unselected. The handles (points/nodes/bullets) you can move on the line can be styled as well, but it seems to be impossible to make a difference between a selected line and a selected handle ON the line. E.g. there is no visual difference between an entire line being selected, or a handle ON that line that is being selected. When the line is selected and you press the delete button, the entire line disappears. But when a handle is selected, ONLY that handle is deleted. That's fine. But how can we know if the entire line OR the handle is selected?

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 reproducing the line-selection and handle-selection behavior described in the issue, including the different delete outcomes. Then trace how selected lines and handles are styled in mapbox-gl-draw; done means the two selection states have a visibly distinguishable styling without changing their deletion behavior.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.