1
0
Fork 0
freesewing/designs/simon/src/cuff.mjs

48 lines
1.2 KiB
JavaScript
Raw Normal View History

2022-09-04 15:55:34 +02:00
import { draftStraightBarrelCuff } from './cuff-barrel-straight.mjs'
import { draftRoundedBarrelCuff } from './cuff-barrel-rounded.mjs'
import { draftAngledBarrelCuff } from './cuff-barrel-angled.mjs'
import { draftStraightFrenchCuff } from './cuff-french-straight.mjs'
import { draftAngledFrenchCuff } from './cuff-french-angled.mjs'
import { draftRoundedFrenchCuff } from './cuff-french-rounded.mjs'
import {
cuffOverlap,
barrelCuffNarrowButton,
cuffButtonRows,
cuffDrape,
cuffEase,
cuffLength,
cuffStyle,
} from './options.mjs'
2018-12-27 13:08:30 +01:00
2022-09-04 15:55:34 +02:00
const simonCuff = (part) => {
const { options } = part.shorthand()
2018-12-27 13:08:30 +01:00
switch (options.cuffStyle) {
2019-08-03 15:03:33 +02:00
case 'roundedBarrelCuff':
2022-09-04 15:55:34 +02:00
return draftRoundedBarrelCuff(part)
2019-08-03 15:03:33 +02:00
case 'straightBarrelCuff':
2022-09-04 15:55:34 +02:00
return draftStraightBarrelCuff(part)
2019-08-03 15:03:33 +02:00
case 'roundedFrenchCuff':
2022-09-04 15:55:34 +02:00
return draftRoundedFrenchCuff(part)
2019-08-03 15:03:33 +02:00
case 'angledFrenchCuff':
2022-09-04 15:55:34 +02:00
return draftAngledFrenchCuff(part)
2019-08-03 15:03:33 +02:00
case 'straightFrenchCuff':
2022-09-04 15:55:34 +02:00
return draftStraightFrenchCuff(part)
2018-12-27 13:08:30 +01:00
default:
2022-09-04 15:55:34 +02:00
return draftAngledBarrelCuff(part)
2018-12-27 13:08:30 +01:00
}
2019-08-03 15:03:33 +02:00
}
2022-09-04 15:55:34 +02:00
export const cuff = {
name: 'simon.cuff',
options: {
cuffOverlap,
barrelCuffNarrowButton,
cuffButtonRows,
cuffDrape,
cuffEase,
cuffLength,
cuffStyle,
},
draft: simonCuff,
}