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

Function start

test/jasmine/assets/drag.js:98–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 var dragCoverNode;
97
98 function start() {
99 if(opts.clearThrottle) opts.clearThrottle();
100
101 var x0 = path[0][0];
102 var y0 = path[0][1];
103
104 var _opts = extendOpts({element: opts.node});
105
106 if(opts.touch) {
107 touchEvent('touchstart', x0, y0, _opts);
108 } else {
109 mouseEvent('mousemove', x0, y0, _opts);
110 mouseEvent('mousedown', x0, y0, _opts);
111 }
112
113 return (opts.noCover ? Promise.resolve(opts.node) : waitForDragCover())
114 .then(function(_dragCoverNode) {
115 dragCoverNode = _dragCoverNode;
116
117 var _opts = extendOpts({element: dragCoverNode});
118
119 path.slice(1).forEach(function(p) {
120 if(opts.clearThrottle) opts.clearThrottle();
121 if(opts.touch) {
122 touchEvent('touchmove', p[0], p[1], _opts);
123 } else {
124 mouseEvent('mousemove', p[0], p[1], _opts);
125 }
126 });
127 });
128 }
129
130 function end() {
131 var iN = path.length - 1;

Callers

nothing calls this directly

Calls 3

extendOptsFunction · 0.85
mouseEventFunction · 0.85
waitForDragCoverFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…