1
0
Fork 0

fix(examples): Added plugin-notches example. Closes #2163

This commit is contained in:
Joost De Cock 2022-05-05 08:49:38 +02:00
parent ab0de6096c
commit ac0ae2bee6
4 changed files with 15 additions and 2 deletions

View file

@ -2,13 +2,13 @@
title: "@freesewing/plugin-notches" title: "@freesewing/plugin-notches"
--- ---
The **@freesewing/plugin-notces** plugin provides the following [snippets](/reference/api/snippets): The **@freesewing/plugin-notches** plugin provides the following [snippets](/reference/api/snippets):
- [notch](/reference/api/snippets/notch) - [notch](/reference/api/snippets/notch)
- [bnotch](/reference/api/snippets/bnotch) - [bnotch](/reference/api/snippets/bnotch)
<Example part="plugin_notches"> <Example part="plugin_notches">
An example of the button, buttonhole, buttonhole-start, buttonhole-end, snap-stud, and snap-socket snippets An example of the notch and bnotch snippets
</Example> </Example>
<Tip> <Tip>

View file

@ -54,6 +54,7 @@ export default {
'plugin_grainline', 'plugin_grainline',
'plugin_logo', 'plugin_logo',
'plugin_mirror', 'plugin_mirror',
'plugin_notches',
'plugin_round', 'plugin_round',
'plugin_scalebox', 'plugin_scalebox',
'plugin_sprinkle', 'plugin_sprinkle',

View file

@ -41,6 +41,7 @@ import draftPlugin_gore from './plugin_gore'
import draftPlugin_grainline from './plugin_grainline' import draftPlugin_grainline from './plugin_grainline'
import draftPlugin_logo from './plugin_logo' import draftPlugin_logo from './plugin_logo'
import draftPlugin_mirror from './plugin_mirror' import draftPlugin_mirror from './plugin_mirror'
import draftPlugin_notches from './plugin_notches'
import draftPlugin_round from './plugin_round' import draftPlugin_round from './plugin_round'
import draftPlugin_sprinkle from './plugin_sprinkle' import draftPlugin_sprinkle from './plugin_sprinkle'
import draftPlugin_scalebox from './plugin_scalebox' import draftPlugin_scalebox from './plugin_scalebox'
@ -138,6 +139,7 @@ let methods = {
draftPlugin_grainline, draftPlugin_grainline,
draftPlugin_logo, draftPlugin_logo,
draftPlugin_mirror, draftPlugin_mirror,
draftPlugin_notches,
draftPlugin_round, draftPlugin_round,
draftPlugin_scalebox, draftPlugin_scalebox,
draftPlugin_sprinkle, draftPlugin_sprinkle,

View file

@ -0,0 +1,10 @@
import { box } from './shared'
export default (part) => {
let { Point, snippets, Snippet } = part.shorthand()
snippets.notch = new Snippet('notch', new Point(60, 10))
snippets.bnotch = new Snippet('bnotch', new Point(80, 10))
return box(part, 140, 20)
}