[OpenLayers-Commits] r11139 -
sandbox/elemoine/draw-feature/lib/OpenLayers/Handler
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Feb 17 16:13:21 EST 2011
Author: erilem
Date: 2011-02-17 13:13:21 -0800 (Thu, 17 Feb 2011)
New Revision: 11139
Modified:
sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Point.js
Log:
an attempt to improve ux when, while drawing, the mouse leaves the map and reenters it
Modified: sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Point.js
===================================================================
--- sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Point.js 2011-02-17 21:13:11 UTC (rev 11138)
+++ sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Point.js 2011-02-17 21:13:21 UTC (rev 11139)
@@ -405,5 +405,20 @@
}
},
+ /**
+ * Method: mouseout
+ * Handle mouse out. For better user experience reset mouseDown
+ * and stoppedDown when the mouse leaves the map viewport.
+ *
+ * Parameters:
+ * evt - {Event} The browser event
+ */
+ mouseout: function(evt) {
+ if(OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
+ this.stoppedDown = this.stopDown;
+ this.mouseDown = false;
+ }
+ },
+
CLASS_NAME: "OpenLayers.Handler.Point"
});
More information about the Commits
mailing list