1
0
Fork 0
freesewing/designs/simon/src/frontright.js

36 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-08-03 15:03:33 +02:00
import { frontDimensions } from './shared'
import frontRightClassicSeperate from './frontright-classic-seperate'
import frontRightClassicCuton from './frontright-classic-cuton'
import frontRightSeamless from './frontright-seamless'
2021-01-31 09:22:15 +01:00
export default (part) => {
const { sa, options, complete, paperless, points, macro, paths } = part.shorthand()
2019-08-03 15:03:33 +02:00
macro('flip')
if (complete) {
2019-08-03 15:03:33 +02:00
points.scalebox = points.waist.shiftFractionTowards(points.cfWaist, 0.5)
macro('scalebox', { at: points.scalebox })
if (paperless) {
2019-08-03 15:03:33 +02:00
frontDimensions(part, 'right')
macro('ld', {
2021-06-19 12:50:46 +02:00
from: points.s3ArmholeSplit,
to: points.s3CollarSplit,
2021-04-24 10:16:31 +02:00
d: 15 + sa,
2019-08-03 15:03:33 +02:00
})
if (sa) {
paths.hemSa.attr('data-text-dy', 7, true)
paths.saFrench.attr('data-text-dy', 7, true)
}
}
2018-12-28 16:57:08 +01:00
}
if (options.seperateButtonPlacket) {
return frontRightClassicSeperate(part)
} else if (options.buttonPlacketStyle === 'seamless') {
return frontRightSeamless(part)
} else if (options.buttonPlacketStyle === 'classic') {
return frontRightClassicCuton(part)
} else {
throw `Unexpected buttonPlacketStyle: ${options.buttonPlacketStyle}`
}
2019-08-03 15:03:33 +02:00
}