[OpenLayers-Commits] r11861 - in trunk/openlayers: lib/OpenLayers/Control lib/OpenLayers/Handler tests/Handler

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Sun Apr 3 08:47:16 EDT 2011


Author: erilem
Date: 2011-04-03 05:47:14 -0700 (Sun, 03 Apr 2011)
New Revision: 11861

Modified:
   trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js
   trunk/openlayers/lib/OpenLayers/Control/MouseToolbar.js
   trunk/openlayers/lib/OpenLayers/Handler/Drag.js
   trunk/openlayers/lib/OpenLayers/Handler/Hover.js
   trunk/openlayers/lib/OpenLayers/Handler/Point.js
   trunk/openlayers/tests/Handler/Drag.html
Log:
mouseout callbacks should check if the mouse leaves map.eventsDiv instead of map.div or map.viewPortDiv, p=jorix, r=me (closes #3239)

Modified: trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js	2011-04-03 05:04:17 UTC (rev 11860)
+++ trunk/openlayers/lib/OpenLayers/Control/MouseDefaults.js	2011-04-03 12:47:14 UTC (rev 11861)
@@ -238,7 +238,7 @@
      */
     defaultMouseOut: function (evt) {
         if (this.mouseDragStart != null && 
-            OpenLayers.Util.mouseLeft(evt, this.map.div)) {
+            OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
             if (this.zoomBox) {
                 this.removeZoomBox();
             }

Modified: trunk/openlayers/lib/OpenLayers/Control/MouseToolbar.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Control/MouseToolbar.js	2011-04-03 05:04:17 UTC (rev 11860)
+++ trunk/openlayers/lib/OpenLayers/Control/MouseToolbar.js	2011-04-03 12:47:14 UTC (rev 11861)
@@ -374,7 +374,7 @@
      */
     defaultMouseOut: function (evt) {
         if (this.mouseDragStart != null
-            && OpenLayers.Util.mouseLeft(evt, this.map.div)) {
+            && OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
             if (this.zoomBox) {
                 this.removeZoomBox();
                 if (this.startViaKeyboard) {

Modified: trunk/openlayers/lib/OpenLayers/Handler/Drag.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Handler/Drag.js	2011-04-03 05:04:17 UTC (rev 11860)
+++ trunk/openlayers/lib/OpenLayers/Handler/Drag.js	2011-04-03 12:47:14 UTC (rev 11861)
@@ -442,7 +442,7 @@
      * {Boolean} Let the event propagate.
      */
     mouseout: function (evt) {
-        if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
+        if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
             if(this.documentDrag === true) {
                 this.addDocumentEvents();
             } else {

Modified: trunk/openlayers/lib/OpenLayers/Handler/Hover.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Handler/Hover.js	2011-04-03 05:04:17 UTC (rev 11860)
+++ trunk/openlayers/lib/OpenLayers/Handler/Hover.js	2011-04-03 12:47:14 UTC (rev 11861)
@@ -110,7 +110,7 @@
      * {Boolean} Continue propagating this event.
      */
     mouseout: function(evt) {
-        if (OpenLayers.Util.mouseLeft(evt, this.map.div)) {
+        if (OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
             this.clearTimer();
             this.callback('move', [evt]);
         }

Modified: trunk/openlayers/lib/OpenLayers/Handler/Point.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Handler/Point.js	2011-04-03 05:04:17 UTC (rev 11860)
+++ trunk/openlayers/lib/OpenLayers/Handler/Point.js	2011-04-03 12:47:14 UTC (rev 11861)
@@ -563,7 +563,7 @@
      * evt - {Event} The browser event
      */
     mouseout: function(evt) {
-        if(OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
+        if(OpenLayers.Util.mouseLeft(evt, this.map.eventsDiv)) {
             this.stoppedDown = this.stopDown;
             this.mouseDown = false;
         }

Modified: trunk/openlayers/tests/Handler/Drag.html
===================================================================
--- trunk/openlayers/tests/Handler/Drag.html	2011-04-03 05:04:17 UTC (rev 11860)
+++ trunk/openlayers/tests/Handler/Drag.html	2011-04-03 12:47:14 UTC (rev 11861)
@@ -252,7 +252,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.viewPortDiv.id,
+            t.eq(element.id, map.eventsDiv.id,
                  "mouseout calls Util.mouseLeft with the correct element");
             return true;
         }



More information about the Commits mailing list