From 55cdc7680a5eb466c5694ce5aa55e6e63dbffd5e Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Wed, 19 Apr 2017 15:49:06 +0300 Subject: [PATCH] fix error when switching from DDS to a constant paint value Makes #3949 less severe (a flash of incorrect value instead of a JS error). --- src/style/style_declaration.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/style/style_declaration.js b/src/style/style_declaration.js index c7dbb72ed8f..7c99bb44f23 100644 --- a/src/style/style_declaration.js +++ b/src/style/style_declaration.js @@ -67,6 +67,7 @@ class StyleDeclaration { * @private */ calculateInterpolationT(globalProperties) { + if (this.isFeatureConstant || this.isZoomConstant) return 0; return this._functionInterpolationT(globalProperties && globalProperties.zoom, {}); } }