[Libreoffice-commits] online.git: loleaflet/src

Pranav Kant pranavk at collabora.co.uk
Thu Sep 15 13:55:41 UTC 2016


 loleaflet/src/layer/vector/Path.Popup.js |  144 +++++++++++++++----------------
 1 file changed, 72 insertions(+), 72 deletions(-)

New commits:
commit 912281bd20e00606b04af069eec365acfb1910f5
Author: Pranav Kant <pranavk at 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();
+		}
+	}
+});


More information about the Libreoffice-commits mailing list