fix up issue with Sencha Touch example not handling double tap to zoom in, r=elemoine (closes #3079)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11226 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -96,6 +96,12 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
|
||||
*/
|
||||
last: null,
|
||||
|
||||
/**
|
||||
* Property: touch
|
||||
* {Boolean} Are we on a touch enabled device? Default is false.
|
||||
*/
|
||||
touch: false,
|
||||
|
||||
/**
|
||||
* Property: rightclickTimerId
|
||||
* {Number} The id of the right mouse timeout waiting to clear the
|
||||
@@ -148,6 +154,7 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
|
||||
* {Boolean} Continue propagating this event.
|
||||
*/
|
||||
touchstart: function(evt) {
|
||||
this.touch = true;
|
||||
this.down = evt;
|
||||
this.last = null;
|
||||
return true;
|
||||
@@ -279,6 +286,10 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
|
||||
* {Boolean} Continue propagating this event.
|
||||
*/
|
||||
click: function(evt) {
|
||||
// Sencha Touch emulates click events, see ticket 3079 for more info
|
||||
if (this.touch === true && evt.type === "click") {
|
||||
return !this.stopSingle;
|
||||
}
|
||||
if(this.passesTolerance(evt)) {
|
||||
if(this.timerId != null) {
|
||||
// already received a click
|
||||
|
||||
Reference in New Issue
Block a user