(cmds)
| 29685 | } |
| 29686 | |
| 29687 | function splitPaths(cmds) { |
| 29688 | |
| 29689 | var paths = [], current; |
| 29690 | for (var i = 0; i < cmds.length; i++) { |
| 29691 | if (cmds[i].type === 'M') { |
| 29692 | if (current) { |
| 29693 | paths.push(current); |
| 29694 | } |
| 29695 | current = []; |
| 29696 | } |
| 29697 | current.push(cmdToArr(cmds[i])); |
| 29698 | } |
| 29699 | paths.push(current); |
| 29700 | |
| 29701 | return paths; |
| 29702 | } |
| 29703 | |
| 29704 | function cmdToArr(cmd) { |
| 29705 |