1
0
Fork 0

Merge pull request #3202 from BenJamesBen/options-docs-fixes

fix(docs): Part Config Options documentation fixes
This commit is contained in:
Joost De Cock 2022-12-11 18:36:14 +01:00 committed by GitHub
commit 5e6cf7fcaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 22 additions and 18 deletions

View file

@ -10,7 +10,7 @@ Counters are for integers only. Things like number of buttons and so on.
Your counter option should be a plain object with these properties:
- `count` : The default integer value
- `min` : The minimal integer value that's allowed
- `min` : The minimum integer value that's allowed
- `max` : The maximum integer value that's allowed
<Tip>

View file

@ -9,7 +9,7 @@ For angles, use a degree option.
Your degree option should be a plain object with these properties:
- `deg` : The default value in degrees
- `min` : The minimul that's allowed
- `min` : The minimum that's allowed
- `max` : The maximum that's allowed
<Tip>
@ -28,9 +28,9 @@ more details.
```js
options: {
collarAngle: {
deg: 85,
min: 60
max: 130
deg: 85,
min: 60,
max: 130,
}
}
```

View file

@ -68,4 +68,4 @@ percentage options][snapped] instead.
[list]: /reference/api/part/config/options/list
[pct]: /reference/api/part/config/options/pct
[snapped]: /reference/api/part/config/options/pct/snap
[mm]: /reference/api/part/config/options/pct/mm
[mm]: /reference/api/part/config/options/mm

View file

@ -30,10 +30,10 @@ options: {
dflt: "angledBarrelCuff",
list: [
"roundedBarrelCuff",
"angledBarrelCuff"
"straightBarrelCuff"
"roundedFrenchCuff"
"angledFrenchCuff"
"angledBarrelCuff",
"straightBarrelCuff",
"roundedFrenchCuff",
"angledFrenchCuff",
"straightFrenchCuff"
]
}

View file

@ -2,16 +2,20 @@
title: Millimeter options
---
<Warning>
While FreeSewing supports millimeter options, we recommend
using [percentage options][1] and will not accept
contributions that use millimeter options.
</Warning>
## Structure
A millimeter option should be a plain object with these properties:
- `mm` : The default value in millimeter
- `min` : The minimul that's allowed
- `mm` : The default value in millimeters
- `min` : The minimum that's allowed
- `max` : The maximum that's allowed
## Example

View file

@ -64,9 +64,9 @@ You can unlock those features by adding the following properties to your option:
- `toAbs`: A method to [return the option value in millimeter][toabs]
- `snap`: The configuration to control [snapping of percentage options][snap]
[fromabs]: /reference/api/config/options/pct/fromabs
[toabs]: /reference/api/config/options/pct/toabs
[snap]: /reference/api/config/options/pct/snap
[fromabs]: /reference/api/part/config/options/pct/fromabs
[toabs]: /reference/api/part/config/options/pct/toabs
[snap]: /reference/api/part/config/options/pct/snap
Refer to the relevant documentation for more details:

View file

@ -91,4 +91,4 @@ it will also add a `toAbs()` method that does the inverse: return the
value in millimeter of whatever percentage the option is set to.
See [Reporting a percentage option value in
millimeter](/reference/api/config/options/pct/toabs) for details.
millimeter](/reference/api/part/config/options/pct/toabs) for details.

View file

@ -90,7 +90,7 @@ of numbers.
The difference is that this allows you to supply a different list of snap values
for users using metric or imperial units.
In the example below, the value of [settings.units](/api/settings/units) will
In the example below, the value of [settings.units](/reference/settings/units) will
determine which list of snap values gets used.
Then, if the absolute value returned by `toAbs()` is in the

View file

@ -81,4 +81,4 @@ also add a `fromAbs()` method that does the inverse: return the percentage of
any millimeter value passed into it.
See [Setting a value in millimeter as a
percentage option](/api/config/options/pct/fromabs) for details.
percentage option](/reference/api/part/config/options/pct/fromabs) for details.