(path, options)
| 35 | } |
| 36 | |
| 37 | function drag(path, options) { |
| 38 | var len = path.length; |
| 39 | |
| 40 | if(!options) options = {type: 'mouse'}; |
| 41 | |
| 42 | Lib.clearThrottle(); |
| 43 | |
| 44 | if(options.type === 'touch') { |
| 45 | touchEvent('touchstart', path[0][0], path[0][1], options); |
| 46 | |
| 47 | path.slice(1, len).forEach(function(pt) { |
| 48 | Lib.clearThrottle(); |
| 49 | touchEvent('touchmove', pt[0], pt[1], options); |
| 50 | }); |
| 51 | |
| 52 | touchEvent('touchend', path[len - 1][0], path[len - 1][1], options); |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | mouseEvent('mousemove', path[0][0], path[0][1], options); |
| 57 | mouseEvent('mousedown', path[0][0], path[0][1], options); |
| 58 | |
| 59 | path.slice(1, len).forEach(function(pt) { |
| 60 | Lib.clearThrottle(); |
| 61 | mouseEvent('mousemove', pt[0], pt[1], options); |
| 62 | }); |
| 63 | |
| 64 | mouseEvent('mouseup', path[len - 1][0], path[len - 1][1], options); |
| 65 | } |
| 66 | |
| 67 | function assertSelectionNodes(cornerCnt, outlineCnt, _msg) { |
| 68 | var msg = _msg ? ' - ' + _msg : ''; |
no test coverage detected
searching dependent graphs…