1
0
Fork 0

Umbra: Conditionally hide options, that aren't relevant

This commit is contained in:
Jonathan Haas 2024-04-17 18:28:02 +02:00
parent 29af9b2704
commit 265b84d718

View file

@ -702,7 +702,12 @@ export const base = {
/* /*
* This option allows you to create extra room in the bulge * This option allows you to create extra room in the bulge
*/ */
bulgeFullness: { pct: 75, min: 25, max: 100, menu: 'fit' }, bulgeFullness: {
pct: 75,
min: 25,
max: 100,
menu: (settings, mergedOptions) => (mergedOptions?.bulge < 2 ? false : 'fit'),
},
// Style options // Style options
@ -787,7 +792,7 @@ export const base = {
pct: 25, pct: 25,
min: 15, min: 15,
max: 35, max: 35,
menu: 'style', menu: (settings, mergedOptions) => (mergedOptions?.pockets === 'none' ? false : 'style'),
toAbs: (val, { measurements }, mergedOptions) => toAbs: (val, { measurements }, mergedOptions) =>
(measurements.hips / 2) * mergedOptions.pocketGap * stretchToScale(mergedOptions.xStretch), (measurements.hips / 2) * mergedOptions.pocketGap * stretchToScale(mergedOptions.xStretch),
}, },
@ -796,7 +801,7 @@ export const base = {
pct: 20, pct: 20,
min: 10, min: 10,
max: 30, max: 30,
menu: 'style', menu: (settings, mergedOptions) => (mergedOptions?.pockets === 'none' ? false : 'style'),
}, },
/* /*