[OpenLayers-Commits] r11113 -
sandbox/elemoine/draw-feature/lib/OpenLayers/Handler
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Sun Feb 13 17:08:46 EST 2011
Author: erilem
Date: 2011-02-13 14:08:46 -0800 (Sun, 13 Feb 2011)
New Revision: 11113
Modified:
sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Path.js
Log:
handler path - destroy persisted feature in mousemove instead of mousedown, all tests now pass
Modified: sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Path.js
===================================================================
--- sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Path.js 2011-02-13 22:08:37 UTC (rev 11112)
+++ sandbox/elemoine/draw-feature/lib/OpenLayers/Handler/Path.js 2011-02-13 22:08:46 UTC (rev 11113)
@@ -233,9 +233,6 @@
this.mouseDown = true;
this.lastDown = evt.xy;
if (this.freehandMode(evt)) {
- if(this.persist) {
- this.destroyPersistedFeature();
- }
return false;
} else {
return !this.stopDown;
@@ -255,6 +252,9 @@
*/
mousemove: function (evt) {
if(this.mouseDown && this.freehandMode(evt)) {
+ if(this.persist) {
+ this.destroyPersistedFeature();
+ }
this.addPoint(evt.xy);
return false;
}
More information about the Commits
mailing list