Making it so the navigation control zooms out on two touch taps. r=erilem (closes #3127)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11537 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -163,6 +163,7 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
|
||||
}
|
||||
|
||||
var clickCallbacks = {
|
||||
'click': this.defaultClick,
|
||||
'dblclick': this.defaultDblClick,
|
||||
'dblrightclick': this.defaultDblRightClick
|
||||
};
|
||||
@@ -189,6 +190,18 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
|
||||
this.mouseWheelOptions );
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: defaultClick
|
||||
*
|
||||
* Parameters:
|
||||
* evt - {Event}
|
||||
*/
|
||||
defaultClick: function (evt) {
|
||||
if (evt.lastTouches && evt.lastTouches.length == 2) {
|
||||
this.map.zoomOut();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: defaultDblClick
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user