From ab85108836af957435b633c8f567de297d618106 Mon Sep 17 00:00:00 2001 From: jfgirard Date: Mon, 12 Nov 2012 11:11:16 -0500 Subject: [PATCH] Path CANVAS adds a click event if clickable but do not clear it on remove. This adds the necessary remove listener. --- src/layer/vector/canvas/Path.Canvas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/layer/vector/canvas/Path.Canvas.js b/src/layer/vector/canvas/Path.Canvas.js index 4a0c1606..cc9c8e15 100644 --- a/src/layer/vector/canvas/Path.Canvas.js +++ b/src/layer/vector/canvas/Path.Canvas.js @@ -35,7 +35,9 @@ L.Path = (L.Path.SVG && !window.L_PREFER_CANVAS) || !L.Browser.canvas ? L.Path : map .off('viewreset', this.projectLatlngs, this) .off('moveend', this._updatePath, this); - + if (this.options.clickable) { + map.off('click', this._onClick, this); + } this._requestUpdate(); this._map = null;