Skip to content

Commit 9d59c3c

Browse files
author
ivankirshin
committed
plotly#2254: Front: Fixes for new chromatogram
1 parent 77cea10 commit 9d59c3c

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

src/plots/cartesian/dragbox.js

+21-18
Original file line numberDiff line numberDiff line change
@@ -398,24 +398,27 @@ function makeDragBox(gd, plotinfo, x, y, w, h, ns, ew) {
398398
} else {
399399
noZoom();
400400
}
401-
} else if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) {
402-
// look for small drags in one direction or the other,
403-
// and only drag the other axis
404-
405-
if(dx < MINDRAG || !xActive) {
406-
noZoom();
407-
} else {
408-
box.t = 0;
409-
box.b = ph;
410-
zoomMode = 'x';
411-
corners.attr('d', xCorners(box, y0));
412-
}
413-
} else if(!xActive || dx < Math.min(dy * 0.6, MINZOOM)) {
414-
box.l = 0;
415-
box.r = pw;
416-
zoomMode = 'y';
417-
corners.attr('d', yCorners(box, x0));
418-
} else {
401+
}
402+
// !!! To disable single axis scaling
403+
// else if(!yActive || dy < Math.min(Math.max(dx * 0.6, MINDRAG), MINZOOM)) {
404+
// // look for small drags in one direction or the other,
405+
// // and only drag the other axis
406+
//
407+
// if(dx < MINDRAG || !xActive) {
408+
// noZoom();
409+
// } else {
410+
// box.t = 0;
411+
// box.b = ph;
412+
// zoomMode = 'x';
413+
// corners.attr('d', xCorners(box, y0));
414+
// }
415+
// } else if(!xActive || dx < Math.min(dy * 0.6, MINZOOM)) {
416+
// box.l = 0;
417+
// box.r = pw;
418+
// zoomMode = 'y';
419+
// corners.attr('d', yCorners(box, x0));
420+
// }
421+
else {
419422
zoomMode = 'xy';
420423
corners.attr('d', xyCorners(box));
421424
}

0 commit comments

Comments
 (0)