1
0
Fork 0

Merge pull request #864 from freesewing/woutervdub-penelope-error

Update shape.js and utils.js.

Fixes [freesewing/freesewing] Error while drafting penelope (#863)
This commit is contained in:
Wouter van Wageningen 2021-02-14 18:18:29 -08:00 committed by GitHub
commit 016e9f27ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 8 deletions

View file

@ -26,12 +26,12 @@ function BuildMainShape(part, frontPart) {
let waist = measurements.waist let waist = measurements.waist
let seat = measurements.seat > waist ? measurements.seat : waist let seat = measurements.seat > waist ? measurements.seat : waist
dartCalc(options, seat, seatEase, waist, waistEase) dartCalc(store, options, seat, seatEase, waist, waistEase)
let nrOfDarts = options.nrOfDarts let nrOfDarts = store.get('nrOfDarts')
let dartSize = options.frontDartSize let dartSize = store.get('frontDartSize')
if (frontPart == false) { if (frontPart == false) {
dartSize = options.backDartSize dartSize = store.get('backDartSize')
} }
if (dartSize <= 0) { if (dartSize <= 0) {

View file

@ -34,7 +34,7 @@ function dartCalcBack(options, seatWaistDiff, nrOfDarts) {
) )
} }
function dartCalc(options, seat, seatEase, waist, waistEase) { function dartCalc(store, options, seat, seatEase, waist, waistEase) {
seat += seatEase seat += seatEase
waist += waistEase waist += waistEase
let seatWaistDiff = Math.max(seat - waist, 0) let seatWaistDiff = Math.max(seat - waist, 0)
@ -90,9 +90,9 @@ function dartCalc(options, seat, seatEase, waist, waistEase) {
}); });
*/ */
options.frontDartSize = frontDartSize store.set('frontDartSize', frontDartSize )
options.backDartSize = backDartSize store.set('backDartSize', backDartSize )
options.nrOfDarts = nrOfDarts store.set('nrOfDarts', nrOfDarts )
} }
/** /**