Commit 624f21c9 authored by Jason Davies's avatar Jason Davies
Browse files

Code formatting: fix indent.

parent 92c9d9d8
...@@ -39,29 +39,29 @@ d3.behavior.zoom = function() { ...@@ -39,29 +39,29 @@ d3.behavior.zoom = function() {
var dispatch = event.of(this, arguments), var dispatch = event.of(this, arguments),
view1 = view; view1 = view;
if (d3_transitionInheritId) { if (d3_transitionInheritId) {
d3.select(this).transition() d3.select(this).transition()
.each("start.zoom", function() { .each("start.zoom", function() {
view = this.__chart__ || {x: 0, y: 0, k: 1}; // pre-transition state view = this.__chart__ || {x: 0, y: 0, k: 1}; // pre-transition state
zoomstarted(dispatch); zoomstarted(dispatch);
}) })
.tween("zoom:zoom", function() { .tween("zoom:zoom", function() {
var dx = size[0], var dx = size[0],
dy = size[1], dy = size[1],
cx = dx / 2, cx = dx / 2,
cy = dy / 2, cy = dy / 2,
i = d3.interpolateZoom( i = d3.interpolateZoom(
[(cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k], [(cx - view.x) / view.k, (cy - view.y) / view.k, dx / view.k],
[(cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k] [(cx - view1.x) / view1.k, (cy - view1.y) / view1.k, dx / view1.k]
); );
return function(t) { return function(t) {
var l = i(t), k = dx / l[2]; var l = i(t), k = dx / l[2];
this.__chart__ = view = {x: cx - l[0] * k, y: cy - l[1] * k, k: k}; this.__chart__ = view = {x: cx - l[0] * k, y: cy - l[1] * k, k: k};
zoomed(dispatch); zoomed(dispatch);
}; };
}) })
.each("end.zoom", function() { .each("end.zoom", function() {
zoomended(dispatch); zoomended(dispatch);
}); });
} else { } else {
this.__chart__ = view; this.__chart__ = view;
zoomstarted(dispatch); zoomstarted(dispatch);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment