Skip to main content

absoluteOptions

The absoluteOptions setting holds the values for snapped percentage options.

tip

The absoluteOptions setting is not intended to be set directly. Instead, using snapped percentage options will automatically cause the option values to be generated. You can access these values through the destructured absoluteOptions property.

Please see the snapped percentage options reference for more details.

Signature

const settings = {
Object absoluteOptions={}
}

Example

export const part = {
name: 'example.part',
measurements: [ 'waist' ],
options: {
width: {
pct: 5, min: 1 max: 25, snap: 7,
toAbs: (pct, { measurements }) => measurements.waist * pct,
}
},
draft: ({ absoluteOptions }
) => {
const garmentWidth = absoluteOptions.width * 1.1
}
}