Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2eaa8d

Browse files
committed
Zoom: Move REDRAWDELAY to constants file
1 parent 85fd4a8 commit b2eaa8d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/plots/cartesian/constants.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,8 @@ module.exports = {
6969
HOVERMINTIME: 50,
7070

7171
// max pixels off straight before a lasso select line counts as bent
72-
BENDPX: 1.5
72+
BENDPX: 1.5,
73+
74+
// delay before a redraw (relayout) after smooth panning and zooming
75+
REDRAWDELAY: 50
7376
};

src/plots/cartesian/dragbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
347347
var scrollViewBox = [0, 0, pw, ph],
348348
// wait a little after scrolling before redrawing
349349
redrawTimer = null,
350-
REDRAWDELAY = 50,
350+
REDRAWDELAY = constants.REDRAWDELAY,
351351
mainplot = plotinfo.mainplot ?
352352
fullLayout._plots[plotinfo.mainplot] : plotinfo;
353353

0 commit comments

Comments
 (0)