loleaflet/src/layer/vector/Path.Popup.js | 144 +++++++++++++++---------------- 1 file changed, 72 insertions(+), 72 deletions(-)
New commits: commit 912281bd20e00606b04af069eec365acfb1910f5 Author: Pranav Kant <pran...@collabora.co.uk> Date: Thu Sep 15 19:24:30 2016 +0530 loleaflet: dos2unix this new file from upstream Leaflet Change-Id: I87000cc481dc9b8880d80606b16cd4151d572be1 diff --git a/loleaflet/src/layer/vector/Path.Popup.js b/loleaflet/src/layer/vector/Path.Popup.js index a3dcef5..247d806 100644 --- a/loleaflet/src/layer/vector/Path.Popup.js +++ b/loleaflet/src/layer/vector/Path.Popup.js @@ -1,72 +1,72 @@ -/* - * Popup extension to L.Path (polylines, polygons, circles), adding popup-related methods. - */ - -L.Path.include({ - - bindPopup: function (content, options) { - - if (content instanceof L.Popup) { - this._popup = content; - } else { - if (!this._popup || options) { - this._popup = new L.Popup(options, this); - } - this._popup.setContent(content); - } - - if (!this._popupHandlersAdded) { - this.on({ - mouseover: this._openPopup, - mouseout: this._delayClose, - remove: this.closePopup, - add: this.firstPopup - }); - - this._popupHandlersAdded = true; - } - - return this; - }, - - unbindPopup: function () { - if (this._popup) { - this._popup = null; - this.off({ - mouseover: this._openPopup, - mouseout: this._delayClose, - remove: this.closePopup, - add: this.firstPopup - }); - - this._popupHandlersAdded = false; - } - return this; - }, - - firstPopup: function (e) { - if (this._popup) { - this._openPopup({latlng: this._bounds.getCenter()}); - } - }, - - closePopup: function () { - if (this._popup) { - this._popup._close(); - } - return this; - }, - - _delayClose: function () { - clearTimeout(this._timer); - this._timer = setTimeout(L.bind(this.closePopup, this), 3000); - }, - - _openPopup: function (e) { - if (!this._map.hasLayer(this._popup)) { - this._popup.setLatLng(e.latlng); - this._map.openPopup(this._popup); - this._delayClose(); - } - } -}); +/* + * Popup extension to L.Path (polylines, polygons, circles), adding popup-related methods. + */ + +L.Path.include({ + + bindPopup: function (content, options) { + + if (content instanceof L.Popup) { + this._popup = content; + } else { + if (!this._popup || options) { + this._popup = new L.Popup(options, this); + } + this._popup.setContent(content); + } + + if (!this._popupHandlersAdded) { + this.on({ + mouseover: this._openPopup, + mouseout: this._delayClose, + remove: this.closePopup, + add: this.firstPopup + }); + + this._popupHandlersAdded = true; + } + + return this; + }, + + unbindPopup: function () { + if (this._popup) { + this._popup = null; + this.off({ + mouseover: this._openPopup, + mouseout: this._delayClose, + remove: this.closePopup, + add: this.firstPopup + }); + + this._popupHandlersAdded = false; + } + return this; + }, + + firstPopup: function (e) { + if (this._popup) { + this._openPopup({latlng: this._bounds.getCenter()}); + } + }, + + closePopup: function () { + if (this._popup) { + this._popup._close(); + } + return this; + }, + + _delayClose: function () { + clearTimeout(this._timer); + this._timer = setTimeout(L.bind(this.closePopup, this), 3000); + }, + + _openPopup: function (e) { + if (!this._map.hasLayer(this._popup)) { + this._popup.setLatLng(e.latlng); + this._map.openPopup(this._popup); + this._delayClose(); + } + } +}); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits