From 44f84ff3a0062e049ae5fa6d9678ca3f59870fd2 Mon Sep 17 00:00:00 2001 From: Joost De Cock Date: Thu, 23 Jul 2020 12:50:01 +0200 Subject: [PATCH] fix(simon): Check that the `cfHips-notch` is available before updating it This notch is not available in Simone, which caused it to break under certain configurations. Fixes [#833](https://github.com/freesewing/freesewing.org/issues/833) --- config/changelog.yaml | 4 ++++ packages/simon/src/buttonholeplacket.js | 12 +++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/config/changelog.yaml b/config/changelog.yaml index 90d03f096a2..9b7386e784b 100644 --- a/config/changelog.yaml +++ b/config/changelog.yaml @@ -13,6 +13,9 @@ Unreleased: - Added backend calls for creating gists/issues on Github wahid: - Added the `square` hem style. Fixes [#672](https://github.com/freesewing/freesewing.org/issues/672) + Changed: + wahid: + - Hem radius can no longer be zero. Use teh `square` hem style for that Fixed: aaron: - Set missing option `brianFitCollar` to `false` @@ -25,6 +28,7 @@ Unreleased: - Adding missing control point to front neck opening simon: - Set missing option `brianFitCollar` to `false` + - Don't assume the `chHips-notch` is available because it's not in Simone. Fixes [#833](https://github.com/freesewing/freesewing.org/issues/833) simone: - Set missing option `brianFitCollar` to `false` sven: diff --git a/packages/simon/src/buttonholeplacket.js b/packages/simon/src/buttonholeplacket.js index 501765187cd..eda1cf7f389 100644 --- a/packages/simon/src/buttonholeplacket.js +++ b/packages/simon/src/buttonholeplacket.js @@ -1,6 +1,6 @@ import { addButtonHoles } from './shared' -export default part => { +export default (part) => { let { utils, sa, @@ -61,11 +61,7 @@ export default part => { .split(points.topInnerEdge)[0] .line(points.bottomInnerEdge) - paths.seam = paths.saBase - .clone() - .line(points.placketBottomEdge) - .close() - .attr('class', 'fabric') + paths.seam = paths.saBase.clone().line(points.placketBottomEdge).close().attr('class', 'fabric') // Complete pattern? if (complete) { @@ -98,7 +94,9 @@ export default part => { // Notches snippets['cfArmhole-notch'].anchor.x = points.cfArmhole.x - fold * 2 snippets['cfWaist-notch'].anchor.x = points.cfArmhole.x - fold * 2 - snippets['cfHips-notch'].anchor.x = points.cfArmhole.x - fold * 2 + // This notch is not available in Simone + if (typeof snippets['cfHips-notch'] !== 'undefined') + snippets['cfHips-notch'].anchor.x = points.cfArmhole.x - fold * 2 // Buttons addButtonHoles(part, 'placketCfNeck')