1
0
Fork 0

feat(plugin-notches): initial release, see #757

This commit is contained in:
Joost De Cock 2020-12-29 18:48:27 +01:00
parent 62e64f973f
commit 43299d6ec4
13 changed files with 256 additions and 9 deletions

View file

@ -1 +0,0 @@
export default '<g id="notch"><circle cy="0" cx="0" r="1.4" class="fill-note" /><circle cy="0" cx="0" r="2.8" class="note" /></g><g id="bnotch"><path d="M -1.1 -1.1 L 1.1 1.1 M 1.1 -1.1 L -1.1 1.1" class="note stroke-xl" /><circle cy="0" cx="0" r="2.8" class="note" /></g>';

View file

@ -1,5 +1,4 @@
import { version, name } from '../package.json'
import notch from './defs/notch'
import gridMetric from './defs/grid-metric'
import gridImperial from './defs/grid-imperial'
import css from './bundle.css.js'
@ -8,10 +7,9 @@ export default {
name: name,
version: version,
hooks: {
preRender: function(svg) {
preRender: function (svg) {
if (svg.attributes.get('freesewing:plugin-theme') === false) {
svg.attributes.set('class', 'freesewing')
svg.defs += notch
svg.style += css
if (svg.pattern.settings.paperless) {
svg.pattern.settings.units === 'imperial'