1
0
Fork 0
freesewing/sites/shared/components/workbench/menus/design-options
joostdecock 631ea8a50d feat(core): New mergeOptions method and passing mergedOtions to toAbs
When using toAbs for all but the most trivial cases, one needs access to
the options. Unlike measurements which are always there, options aren't
always set since they are only set when they differ from the default.

This would shift a lot of responsibility on the pattern designer who
would have to check whether an option is set, and if it's not use the
default which in turn depends on what type of an option it is (and it's
pct for example you have to remember to divide it by 100 and so on).

This feels footgun-y so instead I've added a `mergeOptions` method that
merges the options passed by the user with the defaults from the pattern
config so that you have a simple object with all option values.

This should get passed to `toAbs()` as the 3rd parameter.
2023-06-11 14:16:07 +02:00
..
design-options.en.yaml most menu items using shared components 2023-06-02 12:39:55 -05:00
index.mjs feat(core): New mergeOptions method and passing mergedOtions to toAbs 2023-06-11 14:16:07 +02:00
inputs.mjs add toggler to boolean menu items 2023-06-02 12:41:27 -05:00
values.mjs feat(core): New mergeOptions method and passing mergedOtions to toAbs 2023-06-11 14:16:07 +02:00