Skip to content

Commit 3d0d555

Browse files
committed
fix panAnimation
1 parent b46641f commit 3d0d555

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/map/Map.Pan.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ Map.include(/** @lends Map.prototype */ {
5959
},
6060

6161
_panAnimation: function (target, t, cb) {
62-
if (!this.options['panAnimation']) {
63-
return this.setCenter(target);
64-
}
6562
return this.animateTo({
6663
'center' : target
6764
}, {

src/map/handler/Map.Drag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class MapDragHandler extends Handler {
132132

133133
this._clear();
134134

135-
if (!param.interupted && map._verifyExtent(map.getCenter()) && t < 280 && Math.abs(dy) + Math.abs(dx) > 5) {
135+
if (map.options['panAnimation'] && !param.interupted && map._verifyExtent(map.getCenter()) && t < 280 && Math.abs(dy) + Math.abs(dx) > 5) {
136136
t = 5 * t * (Math.abs(dx) + Math.abs(dy)) / 500;
137137
map.panBy(new Point(dx, dy), { 'duration' : t });
138138
} else {

0 commit comments

Comments
 (0)