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-16 17:32:32 +01:00
|
|
|
|
2022-01-19 16:25:51 +01:00
|
|
|
points.from = new Point(0, 0)
|
|
|
|
points.to = new Point(320, 0)
|
2022-01-16 17:32:32 +01:00
|
|
|
|
2022-01-19 16:25:51 +01:00
|
|
|
paths.banner = new Path().move(points.from).line(points.to)
|
2022-01-16 17:32:32 +01:00
|
|
|
|
|
|
|
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')
|
2022-01-16 17:32:32 +01:00
|
|
|
|
|
|
|
return part
|
|
|
|
}
|
|
|
|
|
|
|
|
export default draftPluginBanner
|