1
0
Fork 0
freesewing/packages/plugintest/src/plugin-logo.js
2022-01-18 12:16:09 +01:00

30 lines
670 B
JavaScript

const addThese = [
'button',
'buttonhole',
'buttonhole-start',
'buttonhole-end',
'snap-stud',
'snap-socket'
]
const draftButtons = part => {
const { points, Point, paths, Path, snippets, Snippet, options } = part.shorthand()
if (['logo', 'all'].indexOf(options.plugin) !== -1) {
points.a = new Point(40, 40)
snippets.a = new Snippet('logo', points.a)
.attr('data-scale', options.logoScale)
.attr('data-rotate', options.logoRotate)
// Prevent clipping of text
paths.box = new Path()
.move(new Point(0,0))
.line(new Point(80, 60))
.attr('class', 'hidden')
}
return part
}
export default draftButtons