From eb82d4ee42e0959b63c3ee16a7992558a9899df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20S=C3=A1nchez=20Ortega?= Date: Thu, 25 Aug 2016 15:09:13 +0200 Subject: [PATCH 1/2] Removed Popup's _zoomanimated option from @fnicollet's changes from #4699 --- src/layer/Popup.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/layer/Popup.js b/src/layer/Popup.js index 6040a29e4..1091d308e 100644 --- a/src/layer/Popup.js +++ b/src/layer/Popup.js @@ -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), From 32084ddbd89ffbf83eb12cecb6073cb934cc1979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20S=C3=A1nchez=20Ortega?= Date: Thu, 25 Aug 2016 15:20:12 +0200 Subject: [PATCH 2/2] Remove zoomanimation option from divOverlay, related to #4699 --- src/layer/DivOverlay.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/layer/DivOverlay.js b/src/layer/DivOverlay.js index c1b6fa4ee..fb2597f2b 100644 --- a/src/layer/DivOverlay.js +++ b/src/layer/DivOverlay.js @@ -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();