Making freehand drawing work on touch devices. Thanks jorix for the excellent patch. r=me (closes #3456)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@12253 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2011-08-17 02:13:06 +00:00
parent 98eabd4d89
commit c517de52f5
2 changed files with 79 additions and 0 deletions

View File

@@ -417,6 +417,10 @@ OpenLayers.Handler.Path = OpenLayers.Class(OpenLayers.Handler.Point, {
var stopDown = this.stopDown;
if(this.freehandMode(evt)) {
stopDown = true;
if (this.touch) {
this.modifyFeature(evt.xy, !!this.lastUp);
OpenLayers.Event.stop(evt);
}
}
if (!this.touch && (!this.lastDown ||
!this.passesTolerance(this.lastDown, evt.xy,