Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Changed onMapPanned behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniCodeMonkey committed Mar 9, 2019
1 parent 5b005a1 commit d99c3c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ export default class Map {
}

setTargetMoveOffset(x, y, animated = true) {
this.onMapPanned && this.onMapPanned(this.state.moveOffset);

if (animated) {
this.state.moveAnimationStart = window.performance.now();

Expand Down Expand Up @@ -298,8 +300,6 @@ export default class Map {
];
}

this.onMapPanned && this.onMapPanned(this.state.moveOffset);

const targetHasBeenReached = this.state.moveOffset.join(',') === targetMoveOffset.join(',');

if (targetHasBeenReached) {
Expand Down

0 comments on commit d99c3c5

Please sign in to comment.