1
0
Fork 0
freesewing/sites/dev/docs/reference/settings/absoluteoptions
Joost De Cock ab3204f9f1 chore: Port FreeSewing.dev to docusaurus
The replaces the NextJS site powering FreeSewing.dev with a Docusaurus
setup. It's part of my efforts to simplify FreeSewing's setup so we can
focus on our core value proposition.
2024-09-28 13:13:48 +02:00
..
readme.mdx chore: Port FreeSewing.dev to docusaurus 2024-09-28 13:13:48 +02:00

---
title: 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](/reference/api/part/config/options/pct/snap)
for more details.

:::

## Signature

```js
const settings = {
  Object absoluteOptions={}
}
```

## Example

```js
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
  }
}
```