Reformat zoomed()
This commit is contained in:
parent
7c1a66d492
commit
d16a86a0c7
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue