MCPcopy Create free account
hub / github.com/plotly/plotly.js / drag

Function drag

test/jasmine/tests/scatterpolargl_test.js:18–33  ·  view source on GitHub ↗
(gd, path)

Source from the content-addressed store, hash-verified

16var checkTextTemplate = require('../assets/check_texttemplate');
17
18function drag(gd, path) {
19 var len = path.length;
20 var el = d3Select(gd).select('rect.nsewdrag').node();
21 var opts = {element: el};
22
23 Lib.clearThrottle();
24 mouseEvent('mousemove', path[0][0], path[0][1], opts);
25 mouseEvent('mousedown', path[0][0], path[0][1], opts);
26
27 path.slice(1, len).forEach(function(pt) {
28 Lib.clearThrottle();
29 mouseEvent('mousemove', pt[0], pt[1], opts);
30 });
31
32 mouseEvent('mouseup', path[len - 1][0], path[len - 1][1], opts);
33}
34
35function select(gd, path) {
36 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…