Reworking click and pinch handling to get better behavior on multi-touch devices. r=ahocevar +testing from others (closes #3133)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11695 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -44,6 +44,12 @@ OpenLayers.Control.TouchNavigation = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
pinchZoomOptions: null,
|
||||
|
||||
/**
|
||||
* APIProperty: clickHandlerOptions
|
||||
* {Object} Options passed to the Click handler.
|
||||
*/
|
||||
clickHandlerOptions: null,
|
||||
|
||||
/**
|
||||
* APIProperty: documentDrag
|
||||
* {Boolean} Allow panning of the map by dragging outside map viewport.
|
||||
@@ -121,13 +127,14 @@ OpenLayers.Control.TouchNavigation = OpenLayers.Class(OpenLayers.Control, {
|
||||
*/
|
||||
draw: function() {
|
||||
var clickCallbacks = {
|
||||
'click': this.defaultClick,
|
||||
'dblclick': this.defaultDblClick
|
||||
};
|
||||
var clickOptions = {
|
||||
'double': true,
|
||||
'stopDouble': true
|
||||
click: this.defaultClick,
|
||||
dblclick: this.defaultDblClick
|
||||
};
|
||||
var clickOptions = OpenLayers.Util.extend({
|
||||
"double": true,
|
||||
stopDouble: true,
|
||||
pixelTolerance: 2
|
||||
}, this.clickHandlerOptions);
|
||||
this.handlers.click = new OpenLayers.Handler.Click(
|
||||
this, clickCallbacks, clickOptions
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user