chore(sven): Avoided laoding unset ribbingHeight from store
This commit is contained in:
parent
d20be35f94
commit
53e8274624
2 changed files with 8 additions and 13 deletions
|
@ -21,12 +21,9 @@ export default (part) => {
|
|||
|
||||
if (options.ribbing) {
|
||||
// Adapt length for ribbing
|
||||
let ribbingHeight
|
||||
if (typeof store.get('ribbingHeight') === 'undefined') {
|
||||
ribbingHeight =
|
||||
(measurements.hpsToWaistBack + measurements.waistToHips) * options.ribbingHeight
|
||||
store.set('ribbingHeight', ribbingHeight)
|
||||
} else ribbingHeight = store.get('ribbingHeight')
|
||||
let ribbingHeight =
|
||||
(measurements.hpsToWaistBack + measurements.waistToHips) * options.ribbingHeight
|
||||
store.setIfUnset('ribbingHeight', ribbingHeight)
|
||||
points.hem = points.hem.shift(90, ribbingHeight)
|
||||
if (front) points.cfHem = points.cfHem.shift(90, ribbingHeight)
|
||||
else points.cbHem = points.cbHem.shift(90, ribbingHeight)
|
||||
|
|
|
@ -13,13 +13,11 @@ export const draftRibbing = function (part, length) {
|
|||
macro,
|
||||
units
|
||||
} = part.shorthand()
|
||||
if (typeof store.get('ribbingHeight') === 'undefined' || part.context.settings.sample) {
|
||||
store.set(
|
||||
'ribbingHeight',
|
||||
(measurements.hpsToWaistBack + measurements.waistToHips) * options.ribbingHeight
|
||||
)
|
||||
}
|
||||
let height = store.get('ribbingHeight')
|
||||
|
||||
let height = (measurements.hpsToWaistBack + measurements.waistToHips) * options.ribbingHeight
|
||||
if (part.context.settings.sample) store.set('ribbingHeight', height)
|
||||
else store.setIfUnset('ribbingHeight', height)
|
||||
|
||||
let gap = 25
|
||||
let lead = 50
|
||||
if (length < 125) lead = length / 3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue