diff --git a/designs/huey/src/back.mjs b/designs/huey/src/back.mjs index db9cb6aa691..fe4f0e87593 100644 --- a/designs/huey/src/back.mjs +++ b/designs/huey/src/back.mjs @@ -2,10 +2,20 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { back as brianBack } from '@freesewing/brian' import { sharedDimensions } from './shared.mjs' -function draftHueyBack (part) { - let { store, macro, Path, Point, points, paths, complete, paperless, sa, options, measurements } = - part.shorthand() - +function draftHueyBack({ + store, + macro, + Path, + Point, + points, + paths, + complete, + paperless, + sa, + options, + measurements, + part, +}) { // Clear paths from Brian for (let i in paths) { if (['backArmhole', 'backCollar'].indexOf(i) === -1) delete paths[i] @@ -79,12 +89,12 @@ export const back = { name: 'huey.back', from: brianBack, hideDependencies: true, - measurements: [ 'hips' ], + measurements: ['hips'], options: { ribbing: { bool: true, menu: 'style' }, ribbingHeight: { pct: 10, min: 5, max: 15, menu: 'style' }, hipsEase: { pct: 8, min: 4, max: 12, menu: 'fit' }, }, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftHueyBack, } diff --git a/designs/huey/src/cuff.mjs b/designs/huey/src/cuff.mjs index d99a396a13b..0073d786b2c 100644 --- a/designs/huey/src/cuff.mjs +++ b/designs/huey/src/cuff.mjs @@ -1,8 +1,7 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { draftRibbing } from './shared.mjs' -function draftHueyCuff (part) { - let { complete, points, measurements, options, macro } = part.shorthand() +function draftHueyCuff({ complete, points, measurements, options, macro, part }) { if (!options.ribbing) return part draftRibbing(part, measurements.wrist * (1 + options.cuffEase) * (1 - options.ribbingStretch)) @@ -24,6 +23,6 @@ export const cuff = { options: { ribbingStretch: { pct: 15, min: 0, max: 30, menu: 'fit' }, }, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftHueyCuff, } diff --git a/designs/huey/src/front.mjs b/designs/huey/src/front.mjs index 945cb463db5..fc8d8519cee 100644 --- a/designs/huey/src/front.mjs +++ b/designs/huey/src/front.mjs @@ -2,10 +2,20 @@ import { front as brianFront } from '@freesewing/brian' import { back } from './back.mjs' import { sharedDimensions } from './shared.mjs' -function draftHueyFront (part) { - let { utils, store, Point, Path, points, paths, complete, paperless, sa, options, measurements } = - part.shorthand() - +function draftHueyFront({ + utils, + store, + Point, + Path, + points, + paths, + complete, + paperless, + sa, + options, + measurements, + part, +}) { // Clear paths from Brian for (let i in paths) { if (['frontArmhole', 'frontCollar'].indexOf(i) === -1) delete paths[i] diff --git a/designs/huey/src/hood.mjs b/designs/huey/src/hood.mjs index 6fbef649e8c..bbb2a4a3ef5 100644 --- a/designs/huey/src/hood.mjs +++ b/designs/huey/src/hood.mjs @@ -1,23 +1,22 @@ import { front } from './front.mjs' import { back } from './back.mjs' -function draftHueyHood (part) { - let { - store, - macro, - Point, - Path, - points, - paths, - complete, - paperless, - snippets, - Snippet, - sa, - options, - measurements, - } = part.shorthand() - +function draftHueyHood({ + store, + macro, + Point, + Path, + points, + paths, + complete, + paperless, + snippets, + Snippet, + sa, + options, + measurements, + part, +}) { let base = store.get('frontNeckSeamLength') + store.get('backNeckSeamLength') points.cfBottom = new Point(0, 0) points.cbBottom = points.cfBottom.shift(0, base).rotate(options.hoodAngle, points.cfBottom) @@ -108,8 +107,8 @@ function draftHueyHood (part) { export const hood = { name: 'huey.hood', - after: [ front, back ], - measurements: [ 'head' ], + after: [front, back], + measurements: ['head'], options: { hoodHeight: { pct: 59, min: 55, max: 65, menu: 'style' }, hoodCutback: { pct: 10, min: 5, max: 15, menu: 'style' }, diff --git a/designs/huey/src/index.mjs b/designs/huey/src/index.mjs index 98f1183a742..f46b45025dc 100644 --- a/designs/huey/src/index.mjs +++ b/designs/huey/src/index.mjs @@ -12,13 +12,8 @@ import { cuff } from './cuff.mjs' // Create design const Huey = new Design({ data, - parts: [ - back, front, sleeve, pocket, hood, waistband, cuff, - ], + parts: [back, front, sleeve, pocket, hood, waistband, cuff], }) // Named exports -export { - back, front, sleeve, pocket, hood, waistband, cuff, - Huey, -} +export { back, front, sleeve, pocket, hood, waistband, cuff, Huey } diff --git a/designs/huey/src/pocket.mjs b/designs/huey/src/pocket.mjs index 739f66522fc..d86dd25b566 100644 --- a/designs/huey/src/pocket.mjs +++ b/designs/huey/src/pocket.mjs @@ -1,9 +1,18 @@ import { front } from './front.mjs' -function draftHueyPocket (part) { - let { macro, Path, points, paths, complete, paperless, snippets, Snippet, sa, options } = - part.shorthand() - +function draftHueyPocket({ + macro, + Path, + points, + paths, + complete, + paperless, + snippets, + Snippet, + sa, + options, + part, +}) { if (!options.pocket) return part // Clear paths and snippets diff --git a/designs/huey/src/shared.mjs b/designs/huey/src/shared.mjs index 88dc599103d..189766ca5d9 100644 --- a/designs/huey/src/shared.mjs +++ b/designs/huey/src/shared.mjs @@ -1,4 +1,4 @@ -export function sharedDimensions (part, s) { +export function sharedDimensions(part, s) { let { macro, Point, points, sa } = part.shorthand() if (s === 'front') { @@ -80,7 +80,7 @@ export function sharedDimensions (part, s) { }) } -export function draftRibbing (part, length) { +export function draftRibbing(part, length) { let { store, measurements, diff --git a/designs/huey/src/sleeve.mjs b/designs/huey/src/sleeve.mjs index 42c6a97a42d..4e496c2f06a 100644 --- a/designs/huey/src/sleeve.mjs +++ b/designs/huey/src/sleeve.mjs @@ -1,10 +1,19 @@ import { sleeve as brianSleeve } from '@freesewing/brian' import { back } from './back.mjs' -function draftHueySleeve (part) { - let { Point, Path, points, paths, store, options, complete, sa, paperless, macro } = - part.shorthand() - +function draftHueySleeve({ + Point, + Path, + points, + paths, + store, + options, + complete, + sa, + paperless, + macro, + part, +}) { // Clear paths from Brian, but keep sleevecap for (let p of Object.keys(paths)) { if (p !== 'sleevecap') delete paths[p] diff --git a/designs/huey/src/waistband.mjs b/designs/huey/src/waistband.mjs index 0f049f9be20..363b943df72 100644 --- a/designs/huey/src/waistband.mjs +++ b/designs/huey/src/waistband.mjs @@ -1,8 +1,7 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { draftRibbing } from './shared.mjs' -function draftHueyWaistband (part) { - let { complete, points, measurements, options, macro } = part.shorthand() +function draftHueyWaistband({ complete, points, measurements, options, macro, part }) { if (!options.ribbing) return part draftRibbing(part, measurements.hips * (1 + options.hipsEase) * (1 - options.ribbingStretch)) @@ -23,6 +22,6 @@ export const waistband = { options: { ribbingStretch: { pct: 15, min: 0, max: 30, menu: 'fit' }, }, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftHueyWaistband, }