From a7d2b165433ab07785b8661272b07a001f6b50f6 Mon Sep 17 00:00:00 2001 From: mourner Date: Tue, 20 Sep 2011 16:22:30 +0300 Subject: [PATCH] Fixed a bug related to panning getting stuck after releasing the mouse over an iframe or flash, closed #64 and #166 --- CHANGELOG.md | 1 + src/dom/Draggable.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52126bd67b2..70a74a9ee6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Leaflet Changelog #### General bugfixes + * Fixed a bug where map panning would stuck forever after releasing the mouse over an iframe or a flash object (thanks to [@sten82](https://github.com/sten82)). [#297](https://github.com/CloudMade/Leaflet/pull/297) [#64](https://github.com/CloudMade/Leaflet/issues/64) * Fixed a bug where mouse zoom worked incorrectly if map is inside scrolled container (partially by [@chrillo](https://github.com/chrillo)). [#206](https://github.com/CloudMade/Leaflet/issues/206) * Fixed a bug where it was possible to add the same listener twice. [#281](https://github.com/CloudMade/Leaflet/issues/281) * Fixed a bug where `Marker` `setIcon` was not working properly (by [@marphi](https://github.com/marphi)). [#218](https://github.com/CloudMade/Leaflet/pull/218) diff --git a/src/dom/Draggable.js b/src/dom/Draggable.js index 88ae2ce00e7..c6f19b0f800 100644 --- a/src/dom/Draggable.js +++ b/src/dom/Draggable.js @@ -43,7 +43,7 @@ L.Draggable = L.Class.extend({ el.className += ' leaflet-active'; } - this._moved = false; + if (this._moved) { return; } if (!L.Browser.touch) { L.DomUtil.disableTextSelection(); @@ -105,6 +105,7 @@ L.Draggable = L.Class.extend({ if (this._moved) { this.fire('dragend'); + this._moved = false; } },