[Pkg-javascript-commits] [leaflet] 50/78: prevent all click events from being removed from map if path doesn't have a click event

Jonas Smedegaard dr at jones.dk
Sat May 7 08:58:46 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit c185cb59c4d838c66cd2daef2272acf31628a4f4
Author: Robert Plummer <robertleeplummerjr at gmail.com>
Date:   Mon Dec 28 11:57:47 2015 -0500

    prevent all click events from being removed from map if path doesn't have a click event
---
 src/layer/vector/canvas/Path.Canvas.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/layer/vector/canvas/Path.Canvas.js b/src/layer/vector/canvas/Path.Canvas.js
index 778d8af..9b3427d 100644
--- a/src/layer/vector/canvas/Path.Canvas.js
+++ b/src/layer/vector/canvas/Path.Canvas.js
@@ -37,7 +37,7 @@ L.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path :
 		    .off('moveend', this._updatePath, this);
 
 		if (this.options.clickable) {
-			this._map.off('click', this._onClick, this);
+			this._map.off('click', this._onClick || function() {}, this);
 			this._map.off('mousemove', this._onMouseMove, this);
 		}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list