You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Zoom doesn't work if not enough pixels are selected on X axis #4156
// more strict than dragged, which allows you to come back to where you started
// and still count as dragged
if(Math.min(box.h,box.w)<MINDRAG*2){
returnremoveZoombox(gd);
}
which removes the zoombox and skips the relayout call on drag-end when the zoombox width or height is less than 16px (as MINDRAG:=8).
During drag, there's some logic around MINZOOM (set to 20px), but still, there are ways to have a zoombox passing MINZOOM requirements, but that have Math.min(box.h, box.w) < MINDRAG * 2, as reported in this issue.
The easiest way to fix this bug, seems to simply move the problematic removeZoombox block from the zoomDone to the zoomMove handler.
Alternatively, we could simply remove the problematic removeZoombox block, allowing for smaller zoom boxes relayouts. At first try, this doesn't appear to lead to any undesired effects.
Activity
etpinard commentedon Aug 29, 2019
Thanks for reporting!
etpinard commentedon Sep 5, 2019
The problem is with the block:
plotly.js/src/plots/cartesian/dragbox.js
Lines 432 to 436 in b453045
which removes the zoombox and skips the
relayoutcall on drag-end when the zoombox width or height is less than 16px (asMINDRAG:=8).During drag, there's some logic around
MINZOOM(set to 20px), but still, there are ways to have a zoombox passingMINZOOMrequirements, but that haveMath.min(box.h, box.w) < MINDRAG * 2, as reported in this issue.The easiest way to fix this bug, seems to simply move the problematic
removeZoomboxblock from thezoomDoneto thezoomMovehandler.Alternatively, we could simply remove the problematic
removeZoomboxblock, allowing for smaller zoom boxes relayouts. At first try, this doesn't appear to lead to any undesired effects.