Merge pull request #1372 from snkashis/zoom_with_layerswitch
Update zoom control buttons with proper state on baselayer switch
This commit is contained in:
commit
52f61bf55a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user