tada: Initial commit
This commit is contained in:
parent
90f088c6d0
commit
89de4d4499
14 changed files with 10335 additions and 1 deletions
1
packages/plugin-buttons/src/button.js
Normal file
1
packages/plugin-buttons/src/button.js
Normal file
|
@ -0,0 +1 @@
|
|||
export default '<g id="button"><circle cx="0" cy="0" r="3.4" style="stroke:#000000;fill:none;stroke-width:1;"/><circle cx="-1" cy="-1" r="0.5" style="stroke:none;fill:#000000;"/><circle cx="1" cy="-1" r="0.5" style="stroke:none;fill:#000000;" /><circle cx="1" cy="1" r="0.5" style="stroke:none;fill:#000000;" /><circle cx="-1" cy="1" r="0.5" style="stroke:none;fill:#000000;" /></g>';
|
1
packages/plugin-buttons/src/buttonhole.js
Normal file
1
packages/plugin-buttons/src/buttonhole.js
Normal file
|
@ -0,0 +1 @@
|
|||
export default '<g id="buttonhole"><path style="fill:none;stroke:#000000;" d="M -1,-5 L 1,-5 L 1,5 L -1,5 z" /><path style="fill:#000000;stroke:none;" d="M -1,-5 L 1,-5 L 1,-4 L -1,-4 z M -1,5 L 1,5 L 1,4 L -1,4 z" /></g>';
|
15
packages/plugin-buttons/src/index.js
Normal file
15
packages/plugin-buttons/src/index.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
import button from "./button";
|
||||
import buttonhole from "./buttonhole";
|
||||
import { name, version } from "../package.json";
|
||||
|
||||
export default {
|
||||
name: name,
|
||||
version: version,
|
||||
hooks: {
|
||||
preRender: function(svg) {
|
||||
if (svg.attributes.get("freesewing:plugin-buttons") === false)
|
||||
svg.attributes.set("freesewing:plugin-buttons", version);
|
||||
svg.defs += button+buttonhole;
|
||||
}
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue