From 7a51a782bc10a6c9894b770870f7f947a33d0e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Mon, 30 May 2011 12:55:16 +0000 Subject: [PATCH] sensible defaut for dragpan interval, r=crschmidt (#3317) git-svn-id: http://svn.openlayers.org/trunk/openlayers@12031 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- examples/mobile-base.js | 1 - examples/mobile-drawing.js | 6 +----- examples/mobile-layers.js | 1 - examples/mobile-navigation.js | 1 - examples/mobile.js | 1 - lib/OpenLayers/Control/DragPan.js | 7 ++++--- 6 files changed, 5 insertions(+), 12 deletions(-) diff --git a/examples/mobile-base.js b/examples/mobile-base.js index c23f9f79e1..f320581787 100644 --- a/examples/mobile-base.js +++ b/examples/mobile-base.js @@ -51,7 +51,6 @@ var init = function (onSelectFeatureFunction) { new OpenLayers.Control.Attribution(), new OpenLayers.Control.TouchNavigation({ dragPanOptions: { - interval: 100, enableKinetic: true } }), diff --git a/examples/mobile-drawing.js b/examples/mobile-drawing.js index 98998d0072..3de462b380 100644 --- a/examples/mobile-drawing.js +++ b/examples/mobile-drawing.js @@ -48,11 +48,7 @@ function init() { -20037508.34, -20037508.34, 20037508.34, 20037508.34 ), controls: [ - new OpenLayers.Control.TouchNavigation({ - dragPanOptions: { - interval: 100 - } - }), + new OpenLayers.Control.TouchNavigation(), new OpenLayers.Control.ZoomPanel(), toolbar ], diff --git a/examples/mobile-layers.js b/examples/mobile-layers.js index 30b9cc5677..05e1f03399 100644 --- a/examples/mobile-layers.js +++ b/examples/mobile-layers.js @@ -29,7 +29,6 @@ function init() { new OpenLayers.Control.Attribution(), new OpenLayers.Control.TouchNavigation({ dragPanOptions: { - interval: 100, enableKinetic: true } }), diff --git a/examples/mobile-navigation.js b/examples/mobile-navigation.js index 29bd5135a1..ce08b498e6 100644 --- a/examples/mobile-navigation.js +++ b/examples/mobile-navigation.js @@ -14,7 +14,6 @@ function init() { controls: [ new OpenLayers.Control.TouchNavigation({ dragPanOptions: { - interval: 100, enableKinetic: true } }), diff --git a/examples/mobile.js b/examples/mobile.js index bd5c5da90d..094647a69e 100644 --- a/examples/mobile.js +++ b/examples/mobile.js @@ -23,7 +23,6 @@ var init = function () { new OpenLayers.Control.Attribution(), new OpenLayers.Control.TouchNavigation({ dragPanOptions: { - interval: 100, enableKinetic: true } }), diff --git a/lib/OpenLayers/Control/DragPan.js b/lib/OpenLayers/Control/DragPan.js index 61001f2bc4..b46c15e36a 100644 --- a/lib/OpenLayers/Control/DragPan.js +++ b/lib/OpenLayers/Control/DragPan.js @@ -32,10 +32,11 @@ OpenLayers.Control.DragPan = OpenLayers.Class(OpenLayers.Control, { /** * Property: interval * {Integer} The number of milliseconds that should ellapse before - * panning the map again. Set this to increase dragging performance. - * Defaults to 25 milliseconds. + * panning the map again. Defaults to 1 millisecond. In most cases + * you won't want to change this value. For slow machines/devices + * larger values can be tried out. */ - interval: 25, + interval: 1, /** * APIProperty: documentDrag