Reformat zoomed()

This commit is contained in:
Jan Philipp Timme 2017-12-30 23:52:55 +01:00
parent 7c1a66d492
commit d16a86a0c7
1 changed files with 3 additions and 6 deletions

View File

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