Merge pull request #4841 from Leaflet/popup-remove-zoomanimation
Remove zoomAnimation from popup and divoverlay
This commit is contained in:
commit
db823b6967
@ -16,11 +16,6 @@ L.DivOverlay = L.Layer.extend({
|
||||
// of the popup when opening it on some overlays.
|
||||
offset: [0, 7],
|
||||
|
||||
// @option zoomAnimation: Boolean = true
|
||||
// Whether to animate the popup on zoom. Disable it if you have
|
||||
// problems with Flash content inside popups.
|
||||
zoomAnimation: true,
|
||||
|
||||
// @option className: String = ''
|
||||
// A custom CSS class name to assign to the popup.
|
||||
className: '',
|
||||
@ -37,7 +32,7 @@ L.DivOverlay = L.Layer.extend({
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
this._zoomAnimated = this._zoomAnimated && this.options.zoomAnimation;
|
||||
this._zoomAnimated = map._zoomAnimated;
|
||||
|
||||
if (!this._container) {
|
||||
this._initLayout();
|
||||
|
@ -76,7 +76,11 @@ L.Popup = L.DivOverlay.extend({
|
||||
// Set it to `false` if you want to override the default behavior of
|
||||
// the popup closing when user clicks the map (set globally by
|
||||
// the Map's [closePopupOnClick](#map-closepopuponclick) option).
|
||||
autoClose: true
|
||||
autoClose: true,
|
||||
|
||||
// @option className: String = ''
|
||||
// A custom CSS class name to assign to the popup.
|
||||
className: ''
|
||||
},
|
||||
|
||||
// @namespace Popup
|
||||
@ -155,7 +159,7 @@ L.Popup = L.DivOverlay.extend({
|
||||
var prefix = 'leaflet-popup',
|
||||
container = this._container = L.DomUtil.create('div',
|
||||
prefix + ' ' + (this.options.className || '') +
|
||||
' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide'));
|
||||
' leaflet-zoom-animated');
|
||||
|
||||
if (this.options.closeButton) {
|
||||
var closeButton = this._closeButton = L.DomUtil.create('a', prefix + '-close-button', container);
|
||||
@ -222,9 +226,7 @@ L.Popup = L.DivOverlay.extend({
|
||||
containerWidth = this._containerWidth,
|
||||
layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);
|
||||
|
||||
if (this._zoomAnimated) {
|
||||
layerPos._add(L.DomUtil.getPosition(this._container));
|
||||
}
|
||||
layerPos._add(L.DomUtil.getPosition(this._container));
|
||||
|
||||
var containerPos = map.layerPointToContainerPoint(layerPos),
|
||||
padding = L.point(this.options.autoPanPadding),
|
||||
|
Loading…
Reference in New Issue
Block a user