From 0f263d0cad02442a379e6735b4a7620a17863140 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Wed, 18 Feb 2015 19:51:00 +0100 Subject: [PATCH] Make sure maxValue is set when minZoomLevel is supplied but maxZoomLevel is not --- lib/GeoExt/widgets/ZoomSlider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/GeoExt/widgets/ZoomSlider.js b/lib/GeoExt/widgets/ZoomSlider.js index 55d5b607..fc7d791b 100644 --- a/lib/GeoExt/widgets/ZoomSlider.js +++ b/lib/GeoExt/widgets/ZoomSlider.js @@ -217,7 +217,7 @@ GeoExt.ZoomSlider = Ext.extend(Ext.slider.SingleSlider, { this.minValue = Math.max(minZoom, layer.minZoomLevel || 0); } if(this.initialConfig.maxValue === undefined) { - this.maxValue = layer.minZoomLevel == null ? + this.maxValue = layer.maxZoomLevel == null ? layer.numZoomLevels - 1 : layer.maxZoomLevel; } // reset the thumb value so it gets repositioned when we call update