✨ Added snaps to plugin-buttons
This commit is contained in:
parent
82bde54dff
commit
a1e9badc2c
3 changed files with 6 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
import button from "./button";
|
||||
import buttonhole from "./buttonhole";
|
||||
import snaps from "./snaps";
|
||||
import { name, version } from "../package.json";
|
||||
|
||||
export default {
|
||||
|
@ -9,7 +10,7 @@ export default {
|
|||
preRender: function(svg) {
|
||||
if (svg.attributes.get("freesewing:plugin-buttons") === false)
|
||||
svg.attributes.set("freesewing:plugin-buttons", version);
|
||||
svg.defs += button+buttonhole;
|
||||
svg.defs += button + buttonhole + snaps;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
1
packages/plugin-buttons/src/snaps.js
Normal file
1
packages/plugin-buttons/src/snaps.js
Normal file
|
@ -0,0 +1 @@
|
|||
export default '<radialGradient id="snap-male-grad" cx="50%" cy="50%" r="50%" fx="50%" fy="50%"><stop offset="30%" style="stop-color:rgb(235,235,235); stop-opacity:1"/><stop offset="80%" style="stop-color:rgb(100,100,100);stop-opacity:1" /></radialGradient><g id="snap-male" ><circle id="snap-male-circle-edge" cx="0" cy="0" r="3.4" style="stroke:#666;fill:#dddddd;stroke-width:0.3;" /><circle id="snap-male-circle-middle" cx="0" cy="0" r="1.8" style="stroke:none;fill:url(#snap-male-grad);"/><path style="fill:none;stroke:#666; stroke-width:0.2;" d="M -2,0 L -3,0 M 2,0 L 3,0 M 0,2 L 0,3 M 0,-2 L 0,-3 M 1.5,1.5 L 2.1,2.1 M -1.5,1.5 L -2.1,2.1 M -1.5,-1.5 L -2.1,-2.1 M 1.5,-1.5 L 2.1,-2.1" id="snap-male-lines"/></g><g id="snap-female"><circle id="snap-female-circle-edge" cx="0" cy="0" r="3.4" style="stroke:#666;fill:#bbbbbb;stroke-width:0.3;"/><circle id="snap-female-circle-middle" cx="0" cy="0" r="2" style="stroke:#666;fill:#dddddd; stroke-width:0.4;"/><path style="fill:none;stroke:#666; stroke-width:0.5;" d="M -1.7,-1 L -1.7,1 M 1.7,-1 L 1.7,1" id="snap-female-lines" /></g>';
|
Loading…
Add table
Add a link
Reference in a new issue