mapbox / mapbox/mapbox-gl-draw

Changing features properties and updating via draw.set does not work

Open
#878 9 comments 16 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

api bug
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.