mapbox / mapbox/mapbox-gl-draw
Changing features properties and updating via draw.set does not work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 8d 9h
- Merged PRs (30d)
- 5
Description
**mapbox-gl-js version**: 0.50.0
**mapbox-gl-draw version**: 1.0.9
### Steps to Trigger Behavior
1. update some features properties in `features`
2. `draw.set(features)`
### Expected Behavior
Draw should render with new properties taken into account
### Actual Behavior
Draw does not appear to re-render. I can get around it by calling `draw.deleteAll()` first but it creates flickering on the features.
I believe this is the `set` equivalent of #287 (PR #295). Cc @averas @mcwhittemore.
Thank you :)
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 at the draw.set(features) entry point and compare it with the deleteAll workaround, then review issue #287 and PR #295 for related behavior. Reproduce with mapbox-gl-js 0.50.0 and mapbox-gl-draw 1.0.9 using changed feature properties; done means draw.set updates the rendered properties without deleteAll or flicker.
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
- 48/100