[OpenLayers-Commits] r11128 - sandbox/elemoine/draw-feature/lib/OpenLayers/Handler

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Feb 16 15:43:18 EST 2011


Author: erilem
Date: 2011-02-16 12:43:18 -0800 (Wed, 16 Feb 2011)
New Revision: 11128

Modified:
   sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Path.js
Log:
path handler - fix js error when shift is pressed on mousedown, but no pressed on mouseup

Modified: sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Path.js
===================================================================
--- sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Path.js	2011-02-16 20:43:09 UTC (rev 11127)
+++ sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Path.js	2011-02-16 20:43:18 UTC (rev 11128)
@@ -231,14 +231,14 @@
      * {Boolean} Allow event propagation
      */
     mousedown: function(evt) {
-        this.mouseDown = true;
         var stopDown = this.stopDown;
         if(this.freehandMode(evt)) {
-            var stopDown = true;
+            stopDown = true;
         } else if(!this.lastDown || !this.lastDown.equals(evt.xy)) {
-            this.lastDown = evt.xy;
             this.modifyFeature(evt.xy, !!this.lastUp);
         }
+        this.mouseDown = true;
+        this.lastDown = evt.xy;
         this.stoppedDown = stopDown;
         return !stopDown;
     },



More information about the Commits mailing list