mapbox / mapbox/mapbox-gl-draw
Detect when feature is being dragged instead of after update
Open
Nobody has claimed this yet.
auto-triaged
feature
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
map.on("draw.create", onCreate);
map.on("draw.update", onUpdate);
map.on("draw.delete", onDelete);
map.on("draw.modechange", onModeChange);
map.on("draw.selectionchange", onSelectionChange);
// map.on("draw.dragFeature", ...);
Is there any simple way to detect if a feature is being moved?
I'm considering if creating a custom mode is necessary or If I have to do this on the mapbox side of things.
Thanks
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 by reviewing the existing draw.create, draw.update, draw.delete, draw.modechange, and draw.selectionchange event handlers, then examine how custom modes relate to feature movement. Determine whether movement can be detected as a distinct event without relying only on draw.update or requiring mapbox-gl-side changes. Done means the movement state or event is reliably distinguishable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100