Reformat zoomed()

This commit is contained in:
Jan Philipp Timme 2017-12-30 23:52:55 +01:00
parent 7c1a66d492
commit d16a86a0c7

View File

@ -519,12 +519,9 @@ function createLineGraph(containerId, raceData){
function zoomed() { function zoomed() {
if (d3.event.sourceEvent && d3.event.sourceEvent.type === "brush") return; // ignore zoom-by-brush if (d3.event.sourceEvent && d3.event.sourceEvent.type === "brush") return; // ignore zoom-by-brush
var t = d3.event.transform; var t = d3.event.transform;
x.domain(t.rescaleX(x2).domain());
x.domain(t.rescaleX(x2).domain()); updateElements();
//call the brush function
updateElements();
//call the brush function
context.select(".brush").call(brush.move, x.range().map(t.invertX, t)); context.select(".brush").call(brush.move, x.range().map(t.invertX, t));
} }