mapbox / mapbox/mapbox-gl-js

Features flash when transitioning between expression + constant values

Open
#6,617 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug :lady_beetle:
Dominant language
TypeScript
Stars
12.4k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

**mapbox-gl-js version**: 0.44.2

**browser**: Chrome 65.0.3325.181

### Steps to Trigger Behavior

1. Create a layer styled with a constant property.
2. Change property to expression-based property (not sure if all expressions, but at least with a `match` expression)
3. Styled properties flicker when switching between constant and expression-based properties.

### Link to Demonstration

* https://jsfiddle.net/lbud/ar1c8trq/1/ : fill layer; mouseover/off features for disappearing flash (disappearing also happens for other layer types including [line](https://jsfiddle.net/lbud/vdc1rmu6/1/))
* https://jsfiddle.net/lbud/jfewqzdz/1/ : fill-extrusion layer; mouseover/off features for flash of black

### Expected Behavior

Previously calculated paint values remain rendered until the first frame when recalculated values are ready, so there is no intermediary flash of any other value besides the two specified

### Actual Behavior

Flash of either transparent or black

cc @anandthakker @kalimar

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

Reproduce the transition using the linked JSFiddle examples, including fill, line, and fill-extrusion layers, and compare constant-to-expression changes. Trace the rendering path for paint-property updates; done means previously calculated values remain visible until recalculated values are ready, without a transparent or black intermediary flash.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
computer-graphics, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.