[OpenLayers-Commits] r10956 - in trunk/openlayers:
lib/OpenLayers/Handler tests/Handler
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Dec 8 11:06:42 EST 2010
Author: erilem
Date: 2010-12-08 08:06:42 -0800 (Wed, 08 Dec 2010)
New Revision: 10956
Modified:
trunk/openlayers/lib/OpenLayers/Handler/Drag.js
trunk/openlayers/tests/Handler/Drag.html
Log:
the drag handler's mouseout func should check if the mouse left the map viewport div as opposed to the map div, r=ahocevar (closes #2941)
Modified: trunk/openlayers/lib/OpenLayers/Handler/Drag.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Handler/Drag.js 2010-12-07 23:56:32 UTC (rev 10955)
+++ trunk/openlayers/lib/OpenLayers/Handler/Drag.js 2010-12-08 16:06:42 UTC (rev 10956)
@@ -313,7 +313,7 @@
* {Boolean} Let the event propagate.
*/
mouseout: function (evt) {
- if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.div)) {
+ if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
if(this.documentDrag === true) {
this.addDocumentEvents();
} else {
Modified: trunk/openlayers/tests/Handler/Drag.html
===================================================================
--- trunk/openlayers/tests/Handler/Drag.html 2010-12-07 23:56:32 UTC (rev 10955)
+++ trunk/openlayers/tests/Handler/Drag.html 2010-12-08 16:06:42 UTC (rev 10956)
@@ -251,7 +251,7 @@
t.ok(evt.xy.x == testEvents.done.xy.x &&
evt.xy.y == testEvents.done.xy.y,
"mouseout calls Util.mouseLeft with the correct event");
- t.eq(element.id, map.div.id,
+ t.eq(element.id, map.viewPortDiv.id,
"mouseout calls Util.mouseLeft with the correct element");
return true;
}
More information about the Commits
mailing list