diff --git a/config/changelog.yaml b/config/changelog.yaml index dc010fc6f6c..ffef4d91dfe 100644 --- a/config/changelog.yaml +++ b/config/changelog.yaml @@ -7,6 +7,9 @@ the number of steps the path will be divided in per Mm (if it's a curve) default is 25 See [#976](https://github.com/freesewing/freesewing/issues/976) + jaeger: + - Draft a third button when it's requested + See [#973](https://github.com/freesewing/freesewing/issues/973) 2.15.1: date: 2021-04-24 diff --git a/packages/jaeger/config/index.js b/packages/jaeger/config/index.js index 4e40b714439..8179808c665 100644 --- a/packages/jaeger/config/index.js +++ b/packages/jaeger/config/index.js @@ -231,6 +231,9 @@ export default { shoulderSlopeReduction: { pct: 30, min: 0, max: 50 }, buttonLength: { pct: 30, min: 30, max: 60 }, - buttons: { count: 2, min: 1, max: 3 }, + buttons: { + list: ['1', '2', '3'], + dflt: '2', + }, }, } diff --git a/packages/jaeger/src/front.js b/packages/jaeger/src/front.js index c27045eebff..9c36bd8112c 100644 --- a/packages/jaeger/src/front.js +++ b/packages/jaeger/src/front.js @@ -403,6 +403,10 @@ export default function (part) { if (options.buttons > 1) { points.button2 = new Point(points.cfWaist.x, points.cutawayPoint.y) buttons.push('button2') + if (options.buttons === 3) { + points.button3 = points.button1.shiftFractionTowards(points.button2, 0.5) + buttons.push('button3') + } } for (let button of buttons) snippets[button] = new Snippet('button', points[button]).attr('data-scale', 2)