From 7a75d07d89e10f76d2d236cfe1203e23619d2ed6 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Wed, 30 Jul 2014 17:37:38 +0300 Subject: [PATCH] update inertia settings --- src/map/handler/Map.Drag.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/map/handler/Map.Drag.js b/src/map/handler/Map.Drag.js index b3281e26..4302a114 100644 --- a/src/map/handler/Map.Drag.js +++ b/src/map/handler/Map.Drag.js @@ -9,7 +9,7 @@ L.Map.mergeOptions({ inertiaDeceleration: 3400, // px/s^2 inertiaMaxSpeed: Infinity, // px/s inertiaThreshold: L.Browser.touch ? 32 : 18, // ms - easeLinearity: 0.25, + easeLinearity: 0.2, // TODO refactor, move to CRS worldCopyJump: false @@ -72,7 +72,7 @@ L.Map.Drag = L.Handler.extend({ this._positions.push(pos); this._times.push(time); - if (time - this._times[0] > 200) { + if (time - this._times[0] > 100) { this._positions.shift(); this._times.shift(); } @@ -141,7 +141,8 @@ L.Map.Drag = L.Handler.extend({ map.panBy(offset, { duration: decelerationDuration, easeLinearity: ease, - noMoveStart: true + noMoveStart: true, + animate: true }); }); }