mapbox / mapbox/mapbox-gl-draw
BoxSelect Multi-Select Should Target All Draw Features
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
Noticed what maybe a bug in regards to boxSelect. Using the box selection for a multi-select only targets rendered features. Thus small features on a lower zoom level will not be targeted.
Tested on:
- mapbox-gl-js version 0.35.0 and mapbox-gl-draw version 0.17.2
- Current CDNs
To Trigger Behavior: (Random fiddle space)
- Create a small polygon, this should be about the size of a city block.
- Create a second larger polygon, say the size of a state around the small polygon.
- Zoom out until the second polygon is no longer visible.
- Use a box selection over the entire larger polygon.
Expected Behavior:
You would expect all draw features within the box selection to be selected. Regardless of render state.
Actual Behavior:
Only the visible features are selected. Thus is you perform a drag after the selection occurs, the smaller feature will remain within it’s original location as it is not selected.
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
Start with the linked JSFiddle and trace the boxSelect multi-select entry point in mapbox-gl-draw. Reproduce the zoomed-out case, then inspect how selection is limited to rendered features. Done means all draw features inside the box are selected, including those not visible at the current zoom.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100