From 60790fea185b45aebf892ac01104533532781a43 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sun, 10 Oct 2021 13:03:09 -0600 Subject: [PATCH] Only trigger change event if animating a tile transition --- src/ol/source/Raster.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js index 824c0e62c8..f6bd72442b 100644 --- a/src/ol/source/Raster.js +++ b/src/ol/source/Raster.js @@ -862,7 +862,9 @@ class RasterSource extends ImageSource { this.dispatchEvent( new RasterSourceEvent(RasterEventType.AFTEROPERATIONS, frameState, data) ); - requestAnimationFrame(this.changed.bind(this)); + if (frameState.animate) { + requestAnimationFrame(this.changed.bind(this)); + } } disposeInternal() {