File tree Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Expand file tree Collapse file tree 2 files changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,6 @@ Map.include(/** @lends Map.prototype */ {
59
59
} ,
60
60
61
61
_panAnimation : function ( target , t , cb ) {
62
- if ( ! this . options [ 'panAnimation' ] ) {
63
- return this . setCenter ( target ) ;
64
- }
65
62
return this . animateTo ( {
66
63
'center' : target
67
64
} , {
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ class MapDragHandler extends Handler {
132
132
133
133
this . _clear ( ) ;
134
134
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 ) {
136
136
t = 5 * t * ( Math . abs ( dx ) + Math . abs ( dy ) ) / 500 ;
137
137
map . panBy ( new Point ( dx , dy ) , { 'duration' : t } ) ;
138
138
} else {
You can’t perform that action at this time.
0 commit comments