1 | import { NUM_DEFAULT } from './constants';
|
2 |
|
3 | export default function line2path(options){
|
4 | var x1 = options.x1 || NUM_DEFAULT,
|
5 | x2 = options.x2 || NUM_DEFAULT,
|
6 | y1 = options.y1 || NUM_DEFAULT,
|
7 | y2 = options.y2 || NUM_DEFAULT;
|
8 |
|
9 | return "M" + x1 + "," + y1 + " L" + x2 + "," + y2;
|
10 | }
|