()
| 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; |
nothing calls this directly
no test coverage detected
searching dependent graphs…