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

15 lines
450 B
JavaScript
Raw Normal View History

2019-08-03 15:03:33 +02:00
import { box } from './shared'
2019-05-20 16:25:55 +02:00
export default part => {
2019-08-03 15:03:33 +02:00
let { Point, points, Snippet, snippets } = part.shorthand()
2019-05-20 16:25:55 +02:00
2019-08-03 15:03:33 +02:00
points.anchor1 = new Point(20, 15)
points.anchor2 = new Point(50, 15)
points.anchor3 = new Point(80, 15)
snippets.demo1 = new Snippet('button', points.anchor1)
snippets.demo2 = new Snippet('buttonhole', points.anchor2)
snippets.demo3 = new Snippet('logo', points.anchor3).attr('data-scale', 0.5)
2019-05-20 16:25:55 +02:00
2019-08-03 15:03:33 +02:00
return box(part)
}