Change animateMarkerZoom to use a class/style rather than setting visibility directly.
This commit is contained in:
parent
106228647e
commit
6d725f02cd
4
dist/leaflet.css
vendored
4
dist/leaflet.css
vendored
@ -290,6 +290,10 @@ a.leaflet-active {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* Popup layout */
|
||||
|
||||
.leaflet-popup {
|
||||
|
@ -36,14 +36,8 @@ L.Map = L.Class.extend({
|
||||
}
|
||||
|
||||
if (!options.animateMarkerZoom) {
|
||||
this.on('zoomstart', function () {
|
||||
this._panes.markerPane.style.visibility = 'hidden';
|
||||
this._panes.shadowPane.style.visibility = 'hidden';
|
||||
});
|
||||
this.on('zoomend', function () {
|
||||
this._panes.markerPane.style.visibility = 'visible';
|
||||
this._panes.shadowPane.style.visibility = 'visible';
|
||||
});
|
||||
this._panes.markerPane.className += ' leaflet-zoom-hide';
|
||||
this._panes.shadowPane.className += ' leaflet-zoom-hide';
|
||||
}
|
||||
|
||||
this._initLayers(options.layers);
|
||||
|
Loading…
Reference in New Issue
Block a user