Skip to content

Commit 46f7466

Browse files
mournergithub-actions[bot]
authored andcommitted
[GLJS] Reduce redundant repaints during initial load (internal-16503)
GitOrigin-RevId: 56ca5f718e7e45bd72b92a0adc373881d2a4b898
1 parent 4211be4 commit 46f7466

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/ui/map.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4593,7 +4593,9 @@ export class Map extends Camera {
45934593
now,
45944594
fadeDuration,
45954595
pitch,
4596-
transition: this.style.transition,
4596+
// Snap transitions before `load` so initial light transitions don't spin repaints;
4597+
// after `load`, user-triggered transitions must animate normally.
4598+
transition: this._loaded ? this.style.transition : {duration: 0, delay: 0},
45974599
worldview: this._worldview
45984600
});
45994601

@@ -4677,10 +4679,6 @@ export class Map extends Camera {
46774679
this._styleDirty = true;
46784680
}
46794681

4680-
if (this.style && (!this.style.modelManager.isLoaded())) {
4681-
this._styleDirty = true;
4682-
}
4683-
46844682
if (this.style && !this._placementDirty) {
46854683
// Since no fade operations are in progress, we can release
46864684
// all tiles held for fading. If we didn't do this, the tiles

0 commit comments

Comments
 (0)