[Pkg-javascript-commits] [leaflet] 31/78: Issue #3829 - Removed Path with mouseout throws error - add check to avoid triggering mouseout events on paths that have already been removed from the map (e.g. when path is removed in onclick event)
Jonas Smedegaard
dr at jones.dk
Sat May 7 08:58:44 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 a51c0c7593260fe1e8434a840f8dafc5daf2c943
Author: Samuel Bernet <samuel.bernet at sbb.ch>
Date: Tue Sep 15 18:03:46 2015 +0200
Issue #3829 - Removed Path with mouseout throws error
- add check to avoid triggering mouseout events on paths that have already been removed from the map (e.g. when path is removed in onclick event)
---
src/layer/vector/Path.SVG.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/layer/vector/Path.SVG.js b/src/layer/vector/Path.SVG.js
index 30c11ad..f530636 100644
--- a/src/layer/vector/Path.SVG.js
+++ b/src/layer/vector/Path.SVG.js
@@ -135,7 +135,7 @@ L.Path = L.Path.extend({
},
_fireMouseEvent: function (e) {
- if (!this.hasEventListeners(e.type)) { return; }
+ if (!this._map || !this.hasEventListeners(e.type)) { return; }
var map = this._map,
containerPoint = map.mouseEventToContainerPoint(e),
--
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