1
0
Fork 0
freesewing/packages/examples/src/path_line.js

17 lines
379 B
JavaScript
Raw Normal View History

2019-08-03 15:03:33 +02:00
import { box } from './shared'
2019-05-25 11:11:46 +02:00
2021-01-31 09:22:15 +01:00
export default (part) => {
2019-08-03 15:03:33 +02:00
let { Point, points, Path, paths } = part.shorthand()
2019-05-25 11:11:46 +02:00
2019-08-03 15:03:33 +02:00
points.from = new Point(10, 10)
points.to = new Point(90, 10)
2019-05-25 11:11:46 +02:00
paths.line = new Path()
.move(points.from)
.line(points.to)
2019-08-03 15:03:33 +02:00
.attr('data-text', 'Path.line()')
.attr('data-text-class', 'text-sm center fill-note')
2019-05-25 11:11:46 +02:00
2019-08-03 15:03:33 +02:00
return box(part, 100, 15)
}