Do not dispatch move event if no mouse move (#78) #79

wants to merge 1 commit into


None yet

3 participants


No description provided.

@mbostock mbostock commented on the diff May 13, 2011
@@ -185,6 +185,7 @@ = function() {
map.panBy = function(x) {
+ if (x.x == 0 && x.y == 0) return;
mbostock May 13, 2011 Contributor

The panBy method is used by zoomBy, and the latter assumes that panBy will always dispatch an event. If that's not the case, then we'll need some additional logic in zoomBy to dispatch an event, or we'll need an internal panning method that does the pan but not the dispatch… So, it's a bit more complicated than this simple fix. :)

leplatrem May 19, 2011

Thank you for your feedback !
... you're right then, it is not as simple as it looked at first sight.

jmarca commented on 2fd824b Dec 8, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment