Merge pull request #3202 from BenJamesBen/options-docs-fixes
fix(docs): Part Config Options documentation fixes
This commit is contained in:
commit
5e6cf7fcaf
9 changed files with 22 additions and 18 deletions
|
@ -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>
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -30,10 +30,10 @@ options: {
|
|||
dflt: "angledBarrelCuff",
|
||||
list: [
|
||||
"roundedBarrelCuff",
|
||||
"angledBarrelCuff"
|
||||
"straightBarrelCuff"
|
||||
"roundedFrenchCuff"
|
||||
"angledFrenchCuff"
|
||||
"angledBarrelCuff",
|
||||
"straightBarrelCuff",
|
||||
"roundedFrenchCuff",
|
||||
"angledFrenchCuff",
|
||||
"straightFrenchCuff"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue