MCPcopy
hub / github.com/plotly/plotly.js / doScroll

Function doScroll

test/jasmine/tests/cartesian_interact_test.js:334–349  ·  view source on GitHub ↗
(subplot, directions, deltaY, opts)

Source from the content-addressed store, hash-verified

332 }
333
334 function doScroll(subplot, directions, deltaY, opts) {
335 return function() {
336 opts = opts || {};
337 var edge = opts.edge || '';
338 var dx = opts.dx || 0;
339 var dy = opts.dy || 0;
340 var dragger = getDragger(subplot, directions);
341 var coords = getNodeCoords(dragger, edge);
342 var nsteps = opts.nsteps || 1;
343
344 for(var i = 1; i <= nsteps; i++) {
345 mouseEvent('scroll', coords.x + dx, coords.y + dy, {deltaY: deltaY / nsteps * i, element: dragger});
346 }
347 return delay(constants.REDRAWDELAY + 10)();
348 };
349 }
350
351 function makeDragFns(subplot, directions, dx, dy, x0, y0) {
352 var dragger = getDragger(subplot, directions);

Callers 1

Calls 2

getDraggerFunction · 0.85
mouseEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…