Skip to content

Commit 4df4091

Browse files
committed
Merge remote-tracking branch 'origin/fix-zoom' into 3.5.6
2 parents 00b215b + 30431b1 commit 4df4091

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/behavior/zoom.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ d3.behavior.zoom = function() {
182182
}
183183

184184
function zoomended(dispatch) {
185-
if (!--zooming) dispatch({type: "zoomend"});
186-
center0 = null;
185+
if (!--zooming) dispatch({type: "zoomend"}), center0 = null;
187186
}
188187

189188
function mousedowned() {
@@ -326,7 +325,7 @@ d3.behavior.zoom = function() {
326325
function mousewheeled() {
327326
var dispatch = event.of(this, arguments);
328327
if (mousewheelTimer) clearTimeout(mousewheelTimer);
329-
else translate0 = location(center0 = center || d3.mouse(this)), d3_selection_interrupt.call(this), zoomstarted(dispatch);
328+
else d3_selection_interrupt.call(this), translate0 = location(center0 = center || d3.mouse(this)), zoomstarted(dispatch);
330329
mousewheelTimer = setTimeout(function() { mousewheelTimer = null; zoomended(dispatch); }, 50);
331330
d3_eventPreventDefault();
332331
scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * view.k);

0 commit comments

Comments
 (0)