setPaintProperty transition for feature-state case
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
**mapbox-gl-js version**:
### Question
There doesn't seem to be transition when using setPaintProperty with case, is there an option to add transition?
My code:
```
this.map.setPaintProperty("seats-layer", "fill-color", ["case",
["boolean", ["feature-state", "hovered"], false],
"#ff6347",
["boolean", ["feature-state", "selected"], false],
"#32CD32",
["boolean", ["feature-state", "unavailable"], false],
"#808080",
"#ffffff"
]);
```
### Links to related documentation
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 setPaintProperty entry point and trace how the supplied fill-color case expression uses feature-state. Reproduce the example to compare direct paint-property changes with feature-state changes, then inspect the related transition documentation. Done means the supported behavior or required transition handling is clearly established and covered by the relevant documentation or tests.
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
- Mostly clear
- Newbie friendliness
- 25/100