Skip to content

Commit 8c04a94

Browse files
committed
rename x0/y0 -> xStart/yStart to avoid conflict for outer scope
1 parent 52fe1d1 commit 8c04a94

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/plots/cartesian/dragbox.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
601601
else if(yActive === 's') dy = dz(yaxes, 0, -dy);
602602
else if(!yActive) dy = 0;
603603

604-
var x0 = (xActive === 'w') ? dx : 0;
605-
var y0 = (yActive === 'n') ? dy : 0;
604+
var xStart = (xActive === 'w') ? dx : 0;
605+
var yStart = (yActive === 'n') ? dy : 0;
606606

607607
if(links.isSubplotConstrained) {
608608
var i;
@@ -614,21 +614,21 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
614614
scaleZoom(xaxes[i], 1 - dy / ph);
615615
}
616616
dx = dy * pw / ph;
617-
x0 = dx / 2;
617+
xStart = dx / 2;
618618
}
619619
if(!yActive && xActive.length === 1) {
620620
for(i = 0; i < yaxes.length; i++) {
621621
yaxes[i].range = yaxes[i]._r.slice();
622622
scaleZoom(yaxes[i], 1 - dx / pw);
623623
}
624624
dy = dx * ph / pw;
625-
y0 = dy / 2;
625+
yStart = dy / 2;
626626
}
627627
}
628628

629629
updateMatchedAxRange('x');
630630
updateMatchedAxRange('y');
631-
updateSubplots([x0, y0, pw - dx, ph - dy]);
631+
updateSubplots([xStart, yStart, pw - dx, ph - dy]);
632632
ticksAndAnnotations();
633633
}
634634

0 commit comments

Comments
 (0)