diff --git a/designs/cathrin/src/base.mjs b/designs/cathrin/src/base.mjs index 1276c40c33f..7829b2a3631 100644 --- a/designs/cathrin/src/base.mjs +++ b/designs/cathrin/src/base.mjs @@ -1,6 +1,4 @@ -function draftCathrinBase (part) { - let { measurements, options, store, points, paths, Point, Path } = part.shorthand() - +function draftCathrinBase({ measurements, options, store, points, paths, Point, Path, part }) { // Where to divide our corset into panels if (options.panels === '11') store.set('gaps', [0.15, 0.275, 0.4, 0.6, 0.75]) else store.set('gaps', [0.2, 0.35, 0.5, 0.65, 0.8]) @@ -94,9 +92,7 @@ function draftCathrinBase (part) { export const base = { name: 'cathrin.base', hide: true, - measurements: [ - 'underbust', 'waist', 'hips', 'waistToUnderbust', 'waistToHips', - ], + measurements: ['underbust', 'waist', 'hips', 'waistToUnderbust', 'waistToHips'], options: { waistReduction: { pct: 10, min: 2, max: 20, menu: 'fit' }, panels: { list: ['11', '13'], dflt: '13', menu: 'fit' }, diff --git a/designs/cathrin/src/index.mjs b/designs/cathrin/src/index.mjs index 70580a22a72..1fc41e7a49a 100644 --- a/designs/cathrin/src/index.mjs +++ b/designs/cathrin/src/index.mjs @@ -14,13 +14,8 @@ import { panels } from './panels.mjs' // Create design const Cathrin = new Design({ data, - parts: [ - panel1, panel2, panel3, panel4, panel5, panel6, - ], + parts: [panel1, panel2, panel3, panel4, panel5, panel6], }) // Named exports -export { - base, panels, panel1, panel2, panel3, panel4, panel5, panel6, - Cathrin, -} +export { base, panels, panel1, panel2, panel3, panel4, panel5, panel6, Cathrin } diff --git a/designs/cathrin/src/panel1.mjs b/designs/cathrin/src/panel1.mjs index 05b559c3d36..94600f9f689 100644 --- a/designs/cathrin/src/panel1.mjs +++ b/designs/cathrin/src/panel1.mjs @@ -2,8 +2,8 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { panels } from './panels.mjs' import { draftPanel1ab } from './panel1ab.mjs' -function draftCathrinPanel1 (part) { - let { macro, sa, paths, points, options, complete, paperless } = part.shorthand() +function draftCathrinPanel1(params) { + const { macro, sa, paths, points, options, complete, paperless, part } = params points.anchor = points.topCF.clone() @@ -14,7 +14,7 @@ function draftCathrinPanel1 (part) { delete paths.panel5 delete paths.panel6 - if (options.panels === '13') return draftPanel1ab(part) + if (options.panels === '13') return draftPanel1ab(params) // Complete pattern? if (complete) { @@ -76,6 +76,6 @@ function draftCathrinPanel1 (part) { export const panel1 = { name: 'cathrin.panel1', from: panels, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftCathrinPanel1, } diff --git a/designs/cathrin/src/panel1ab.mjs b/designs/cathrin/src/panel1ab.mjs index c5ad2a75775..3d7f0d2fa05 100644 --- a/designs/cathrin/src/panel1ab.mjs +++ b/designs/cathrin/src/panel1ab.mjs @@ -1,6 +1,15 @@ -export function draftPanel1ab (part) { - let { macro, utils, sa, points, paths, Point, Path, complete, paperless } = part.shorthand() - +export function draftPanel1ab({ + macro, + utils, + sa, + points, + paths, + Point, + Path, + complete, + paperless, + part, +}) { points.anchor = points.topCF.clone() let top = new Path() @@ -18,10 +27,7 @@ export function draftPanel1ab (part) { .line(points.topABsplit) .join(top.split(points.topABsplit)[1]) .setRender(false) - paths.panel1a = paths.panel1a_nonfold.clone() - .close() - .attr('class', 'fabric') - .setRender(true) + paths.panel1a = paths.panel1a_nonfold.clone().close().attr('class', 'fabric').setRender(true) paths.panel1b = bottom .split(points.bottomABsplit)[1] .curve(points.hipsGap1Cp, points.waistGap1LeftCp1, points.waistGap1Left) @@ -39,10 +45,7 @@ export function draftPanel1ab (part) { if (complete) { if (sa) { paths.saA = paths.panel1a_nonfold.offset(sa).attr('class', 'fabric sa') - paths.saA - .line(points.topCF) - .move(points.bottomCF) - .line(paths.saA.start()) + paths.saA.line(points.topCF).move(points.bottomCF).line(paths.saA.start()) paths.saB = paths.panel1b.offset(sa).attr('class', 'fabric sa') } macro('cutonfold', { diff --git a/designs/cathrin/src/panel2.mjs b/designs/cathrin/src/panel2.mjs index 7db266d2bfd..a22804b51c2 100644 --- a/designs/cathrin/src/panel2.mjs +++ b/designs/cathrin/src/panel2.mjs @@ -1,9 +1,7 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { panels } from './panels.mjs' -function draftCathrinPanel2 (part) { - let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand() - +function draftCathrinPanel2({ macro, sa, points, paths, Point, complete, paperless, part }) { points.anchor = points.underbustGap1Right.clone() delete paths.outline @@ -77,6 +75,6 @@ function draftCathrinPanel2 (part) { export const panel2 = { name: 'cathrin.panel2', from: panels, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftCathrinPanel2, } diff --git a/designs/cathrin/src/panel3.mjs b/designs/cathrin/src/panel3.mjs index a2e9bc63bd1..b6c4ee48958 100644 --- a/designs/cathrin/src/panel3.mjs +++ b/designs/cathrin/src/panel3.mjs @@ -1,9 +1,7 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { panels } from './panels.mjs' -function draftCathrinPanel3 (part) { - let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand() - +function draftCathrinPanel3({ macro, sa, points, paths, Point, complete, paperless, part }) { points.anchor = points.underbustGap2Right.clone() delete paths.outline @@ -77,6 +75,6 @@ function draftCathrinPanel3 (part) { export const panel3 = { name: 'cathrin.panel3', from: panels, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftCathrinPanel3, } diff --git a/designs/cathrin/src/panel4.mjs b/designs/cathrin/src/panel4.mjs index c62670968cd..439ebc52976 100644 --- a/designs/cathrin/src/panel4.mjs +++ b/designs/cathrin/src/panel4.mjs @@ -1,9 +1,18 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { panels } from './panels.mjs' -function draftCathrinPanel4 (part) { - let { macro, sa, snippets, Snippet, points, paths, Point, complete, paperless } = part.shorthand() - +function draftCathrinPanel4({ + macro, + sa, + snippets, + Snippet, + points, + paths, + Point, + complete, + paperless, + part, +}) { points.anchor = points.underbustGap3Right.clone() delete paths.outline @@ -80,6 +89,6 @@ function draftCathrinPanel4 (part) { export const panel4 = { name: 'cathrin.panel4', from: panels, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftCathrinPanel4, } diff --git a/designs/cathrin/src/panel5.mjs b/designs/cathrin/src/panel5.mjs index b9da240ff61..f42a89ca14e 100644 --- a/designs/cathrin/src/panel5.mjs +++ b/designs/cathrin/src/panel5.mjs @@ -1,9 +1,7 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { panels } from './panels.mjs' -function draftCathrinPanel5 (part) { - let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand() - +function draftCathrinPanel5({ macro, sa, points, paths, Point, complete, paperless, part }) { points.anchor = points.underbustGap4Right.clone() delete paths.outline @@ -77,6 +75,6 @@ function draftCathrinPanel5 (part) { export const panel5 = { name: 'cathrin.panel5', from: panels, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftCathrinPanel5, } diff --git a/designs/cathrin/src/panel6.mjs b/designs/cathrin/src/panel6.mjs index a3107429660..258c05a5122 100644 --- a/designs/cathrin/src/panel6.mjs +++ b/designs/cathrin/src/panel6.mjs @@ -1,9 +1,7 @@ import { pluginBundle } from '@freesewing/plugin-bundle' import { panels } from './panels.mjs' -function draftCathrinPanel6 (part) { - let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand() - +function draftCathrinPanel6({ macro, sa, points, paths, Point, complete, paperless, part }) { points.anchor = points.backRise.clone() delete paths.outline @@ -82,6 +80,6 @@ function draftCathrinPanel6 (part) { export const panel6 = { name: 'cathrin.panel6', from: panels, - plugins: [ pluginBundle ], + plugins: [pluginBundle], draft: draftCathrinPanel6, } diff --git a/designs/cathrin/src/panels.mjs b/designs/cathrin/src/panels.mjs index 1ea255db017..65804375b38 100644 --- a/designs/cathrin/src/panels.mjs +++ b/designs/cathrin/src/panels.mjs @@ -1,7 +1,6 @@ import { base } from './base.mjs' -function draftCathrinPanels (part) { - let { measurements, options, store, points, paths, Point, Path } = part.shorthand() +function draftCathrinPanels({ measurements, options, store, points, paths, Point, Path, part }) { let count = 1 let bottom = new Path() .move(points.bottomCF)