Take into account the comments of bartvde
This commit is contained in:
@@ -88,8 +88,8 @@ OpenLayers.Handler = OpenLayers.Class({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Property: touch
|
* Property: touch
|
||||||
* {Boolean} Indcates the support of touch events. When touch events are
|
* {Boolean} Indicates the support of touch events. When touch events are
|
||||||
* starded touch will be true and all mouse related listeners will do
|
* started touch will be true and all mouse related listeners will do
|
||||||
* nothing.
|
* nothing.
|
||||||
*/
|
*/
|
||||||
touch: false,
|
touch: false,
|
||||||
@@ -202,16 +202,11 @@ OpenLayers.Handler = OpenLayers.Class({
|
|||||||
/**
|
/**
|
||||||
* Method: startTouch
|
* Method: startTouch
|
||||||
* Start touch events, this method must be called by subclasses in
|
* Start touch events, this method must be called by subclasses in
|
||||||
* "touchstart" method. When touch events are starded <touch> will be
|
* "touchstart" method. When touch events are started <touch> will be
|
||||||
* true and all mouse related listeners will do nothing.
|
* true and all mouse related listeners will do nothing.
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {Boolean} The touch events are started.
|
|
||||||
*/
|
*/
|
||||||
startTouch: function() {
|
startTouch: function() {
|
||||||
if (this.touch) {
|
if (!this.touch) {
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
this.touch = true;
|
this.touch = true;
|
||||||
var events = [
|
var events = [
|
||||||
"mousedown", "mouseup", "mousemove", "click", "dblclick",
|
"mousedown", "mouseup", "mousemove", "click", "dblclick",
|
||||||
@@ -222,7 +217,6 @@ OpenLayers.Handler = OpenLayers.Class({
|
|||||||
this.unregister(events[i], this[events[i]]);
|
this.unregister(events[i], this[events[i]]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user