1
0
Fork 0

fix(jaeger): Draft third button. Fixes #973

This commit is contained in:
Joost De Cock 2021-04-28 19:47:13 +02:00
parent 14fb6c9f4f
commit 6c33623c50
3 changed files with 11 additions and 1 deletions

View file

@ -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

View file

@ -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',
},
},
}

View file

@ -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)