MCPcopy Index your code
hub / github.com/plotly/plotly.js / drag

Function drag

test/jasmine/tests/scattergl_select_test.js:32–47  ·  view source on GitHub ↗
(gd, path)

Source from the content-addressed store, hash-verified

30}
31
32function drag(gd, path) {
33 var len = path.length;
34 var el = d3Select(gd).select('rect.nsewdrag').node();
35 var opts = {element: el};
36
37 Lib.clearThrottle();
38 mouseEvent('mousemove', path[0][0], path[0][1], opts);
39 mouseEvent('mousedown', path[0][0], path[0][1], opts);
40
41 path.slice(1, len).forEach(function(pt) {
42 Lib.clearThrottle();
43 mouseEvent('mousemove', pt[0], pt[1], opts);
44 });
45
46 mouseEvent('mouseup', path[len - 1][0], path[len - 1][1], opts);
47}
48
49function select(gd, path) {
50 return new Promise(function(resolve, reject) {

Callers 1

selectFunction · 0.70

Calls 1

mouseEventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…