Handler.Feature: fix mobile support. p=fredj,erilem r=erilem (closes #3106)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11510 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2011-02-25 15:18:02 +00:00
parent a26f8b7e27
commit a076ce9228
2 changed files with 48 additions and 4 deletions

View File

@@ -29,7 +29,8 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
'mousemove': {'in': 'over', 'out': 'out'},
'dblclick': {'in': 'dblclick', 'out': null},
'mousedown': {'in': null, 'out': null},
'mouseup': {'in': null, 'out': null}
'mouseup': {'in': null, 'out': null},
'touchstart': {'in': 'click', 'out': 'clickout'}
},
/**
@@ -117,6 +118,19 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
this.layer = layer;
},
/**
* Method: touchstart
* Handle touchmove events
*
* Parameters:
* evt - {Event}
*
* Returns:
* {Boolean} Let the event propagate.
*/
touchstart: function(evt) {
return this.mousedown(evt);
},
/**
* Method: mousedown