Skip to content

Commit

Permalink
Do not dispatch 'move' event if no drag
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed May 13, 2011
1 parent aa653ba commit 2fd824b
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 64 deletions.
1 change: 1 addition & 0 deletions polymaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ po.map = function() {
};

map.panBy = function(x) {
if (x.x == 0 && x.y == 0) return;
var k = 45 / Math.pow(2, zoom + zoomFraction - 3),
dx = x.x * k,
dy = x.y * k;
Expand Down
Loading

1 comment on commit 2fd824b

@jmarca
Copy link

@jmarca jmarca commented on 2fd824b Dec 8, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool. this has been bugging me and I've never gotten around to fixing it myself.

Please sign in to comment.