From 6d567a356f5d67e5e4b6ff5eda86edad1416abb9 Mon Sep 17 00:00:00 2001 From: joostdecock Date: Sun, 14 Jan 2024 14:45:21 +0100 Subject: [PATCH] fix(charlie): Indicate correct cutlist nr on parts 4 and 8 Closes #5791 Shout-out to @jpmunic for reporting this --- config/changelog.yaml | 4 ++ designs/charlie/src/back-pocket-welt.mjs | 65 ++++++++++++--------- designs/charlie/src/front-pocket-facing.mjs | 2 +- 3 files changed, 43 insertions(+), 28 deletions(-) diff --git a/config/changelog.yaml b/config/changelog.yaml index dfc6786f6b0..ac4cae30ddf 100644 --- a/config/changelog.yaml +++ b/config/changelog.yaml @@ -9,6 +9,10 @@ Unreleased: react-components: - This Pattern component now supports translation of nested arrays of strings, giving you more flexibility to concatenate translated parts of strings + Fixed: + charlie: + - The back pocket welt (4) and front pocket facing (8) incorrectly indicated to cut 2 instead of 4 in the cutlist. Fixes #5791 + Removed: plugin-annotations: - The `classes.cutlist` config is removed from the title plugin, cutlist info is now included as notes diff --git a/designs/charlie/src/back-pocket-welt.mjs b/designs/charlie/src/back-pocket-welt.mjs index e8f9edf5e43..48c7b7d4ded 100644 --- a/designs/charlie/src/back-pocket-welt.mjs +++ b/designs/charlie/src/back-pocket-welt.mjs @@ -6,9 +6,9 @@ function draftCharlieBackPocketWelt({ paths, Path, complete, - paperless, macro, snippets, + store, part, }) { // Clean up @@ -39,34 +39,45 @@ function draftCharlieBackPocketWelt({ if (complete) { paths.fold = new Path().move(points.midLeft).line(points.midRight).attr('class', 'help') - points.titleAnchor = points.rightNotch.shiftFractionTowards(points.leftNotch, 0.5) - macro('title', { - at: points.titleAnchor, - nr: 4, - title: 'backPocketWelt', - scale: 0.5, - }) - points.grainlineTop = points.topLeft.shiftFractionTowards(points.topRight, 0.15) - points.grainlineBottom = new Point(points.grainlineTop.x, points.bottomLeft.y) - macro('grainline', { - from: points.grainlineTop, - to: points.grainlineBottom, - }) - - if (paperless) { - macro('hd', { - from: points.bottomLeft, - to: points.bottomRight, - y: points.bottomLeft.y + 15, - }) - macro('vd', { - from: points.bottomRight, - to: points.topRight, - x: points.topRight.x + 15, - }) - } } + /* + * Annotations + */ + // Cut list + store.cutlist.setCut({ cut: 4, from: 'fabric' }) + + // Title + points.titleAnchor = points.rightNotch.shiftFractionTowards(points.leftNotch, 0.5) + macro('title', { + at: points.titleAnchor, + nr: 4, + title: 'backPocketWelt', + scale: 0.5, + }) + + // Grainline + points.grainlineTop = points.topLeft.shiftFractionTowards(points.topRight, 0.15) + points.grainlineBottom = new Point(points.grainlineTop.x, points.bottomLeft.y) + macro('grainline', { + from: points.grainlineTop, + to: points.grainlineBottom, + }) + + // Dimensions + macro('hd', { + id: 'width', + from: points.bottomLeft, + to: points.bottomRight, + y: points.bottomLeft.y + 15, + }) + macro('vd', { + id: 'height', + from: points.bottomRight, + to: points.topRight, + x: points.topRight.x + 15, + }) + return part } diff --git a/designs/charlie/src/front-pocket-facing.mjs b/designs/charlie/src/front-pocket-facing.mjs index 0ac503a6700..f3c315cf9e8 100644 --- a/designs/charlie/src/front-pocket-facing.mjs +++ b/designs/charlie/src/front-pocket-facing.mjs @@ -40,7 +40,7 @@ function draftCharlieFrontPocketFacing({ * Annotations */ // cutlist - store.cutlist.setCut({ cut: 2, from: 'fabric' }) + store.cutlist.setCut({ cut: 4, from: 'fabric' }) // Title points.titleAnchor = points.slantBottomNotch.shift(0, 10)