Skip to content

Commit b767373

Browse files
ibesoragithub-actions[bot]
authored andcommitted
Trigger re-layout when setting appearances via runtime
GitOrigin-RevId: 7fdec2a7f9ca5f164264d089d452776aa5166014
1 parent 2b7cb74 commit b767373

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/style/style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2996,7 +2996,7 @@ class Style extends Evented<MapEvents> {
29962996

29972997
if (name === 'appearances') {
29982998
layer.setAppearances(value);
2999-
this._changes.setDirty();
2999+
this._updateLayer(layer);
30003000
} else if (layer.isPaintProperty(name)) {
30013001
this.setPaintProperty(layerId, name, value as PaintSpecification[T], options);
30023002
} else {

test/ignores/all.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,6 @@ const skip = [
282282
// Not implemented, https://mapbox.atlassian.net/browse/GLJS-1591
283283
"render-tests/slots/inner-slot-before-outer",
284284
"render-tests/slots/mixed-slot-order-with-imports",
285-
286-
// https://mapbox.atlassian.net/browse/GLJS-1647
287-
"render-tests/appearance/runtime-changes/property-change",
288285
];
289286

290287
export default {todo, skip};

test/integration/lib/operation-handlers.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ export const operationHandlers = {
253253
showCollisionBoxes(map, params, doneCb) {
254254
map.showCollisionBoxes = true;
255255
doneCb();
256+
},
257+
setLayerProperty(map, params, doneCb) {
258+
map.setLayerProperty(...params);
259+
waitForRender(map, () => map.loaded(), doneCb);
256260
}
257261
};
258262

0 commit comments

Comments
 (0)