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

21 lines
482 B
JavaScript
Raw Normal View History

2022-01-19 16:25:51 +01:00
const draftPluginBanner = (part) => {
2022-01-20 09:07:38 +01:00
const { points, Point, paths, Path, macro } = part.shorthand()
2022-01-19 16:25:51 +01:00
points.from = new Point(0, 0)
points.to = new Point(320, 0)
2022-01-19 16:25:51 +01:00
paths.banner = new Path().move(points.from).line(points.to)
macro('banner', {
path: 'banner',
text: 'banner plugin',
})
// Prevent clipping of text
2022-01-19 16:25:51 +01:00
paths.box = new Path().move(new Point(0, -20)).line(new Point(0, 20)).attr('class', 'hidden')
return part
}
export default draftPluginBanner