Merge pull request #1372 from snkashis/zoom_with_layerswitch

Update zoom control buttons with proper state on baselayer switch
This commit is contained in:
Vladimir Agafonkin 2013-02-13 07:27:12 -08:00
commit 52f61bf55a

View File

@ -18,13 +18,13 @@ L.Control.Zoom = L.Control.extend({
this._zoomOutButton = this._createButton(
'-', 'Zoom out', zoomName + '-out', container, this._zoomOut, this);
map.on('zoomend', this._updateDisabled, this);
map.on('zoomend baselayerchange', this._updateDisabled, this);
return container;
},
onRemove: function (map) {
map.off('zoomend', this._updateDisabled, this);
map.off('zoomend baselayerchange', this._updateDisabled, this);
},
_zoomIn: function (e) {