1
0
Fork 0

adding length and width options

This commit is contained in:
Zee 2022-03-19 16:12:47 +01:00
parent 7eae745ce6
commit ddcdc212aa
2 changed files with 6 additions and 5 deletions

View file

@ -22,14 +22,15 @@ export default {
'sewing pattern',
],
optionGroups: {
fit: ['size'],
fit: ['length', 'width'],
},
measurements: [],
dependencies: {},
inject: {},
hide: [],
parts: ['box'],
parts: ['pocket'],
options: {
size: { pct: 50, min: 10, max: 100 },
length: { pct: 50, min: 10, max: 100 },
width: { pct: 50, min: 10, max: 100 },
},
}

View file

@ -1,12 +1,12 @@
import freesewing from '@freesewing/core'
import plugins from '@freesewing/plugin-bundle'
import config from '../config'
import draftBox from './box'
import draftPocket from './pocket'
// Create new design
const Pattern = new freesewing.Design(config, plugins)
// Attach the draft methods to the prototype
Pattern.prototype.draftBox = draftBox
Pattern.prototype.draftPocket = draftPocket
export default Pattern