mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-16 16:45:22 +00:00
Merge pull request #1372 from snkashis/zoom_with_layerswitch
Update zoom control buttons with proper state on baselayer switch
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user