diff --git a/eustia/viewportScale.js b/eustia/viewportScale.js index dc602e1..d386a37 100644 --- a/eustia/viewportScale.js +++ b/eustia/viewportScale.js @@ -5,7 +5,7 @@ * ``` */ -_('meta clamp trim each map'); +_('meta clamp trim each map isNaN'); function exports() { @@ -31,5 +31,10 @@ function exports() if (key === 'minimum-scale') minScale = +val; }); - return clamp(initialScale, minScale, maxScale); + let ret = clamp(initialScale, minScale, maxScale); + + // Some will use ';' to be the separator, need to avoid the wrong result. + if (isNaN(ret)) return 1; + + return ret; } \ No newline at end of file diff --git a/src/lib/util.js b/src/lib/util.js index 3d4cb3b..eda1b00 100644 --- a/src/lib/util.js +++ b/src/lib/util.js @@ -6829,7 +6829,7 @@ export var viewportScale = _.viewportScale = (function () */ /* dependencies - * meta clamp trim each map + * meta clamp trim each map isNaN */ function exports() @@ -6856,7 +6856,12 @@ export var viewportScale = _.viewportScale = (function () if (key === 'minimum-scale') minScale = +val; }); - return clamp(initialScale, minScale, maxScale); + let ret = clamp(initialScale, minScale, maxScale); + + // Some will use ';' to be the separator, need to avoid the wrong result. + if (isNaN(ret)) return 1; + + return ret; } return exports;