fix(reference:api): Revert incorrect Example formatting (#367)
This PR reverts the incorrect lint/prettier changes applied to <Example> code in the reference Core API docs l by the husky pre-commit hook, the problem mentioned in Issue #333. (These are just the changes for the Core API docs. Additional PRs will be filed for changes in the other reference, howtos, and guides documentation.) Co-authored-by: Benjamin Fan <ben-git@swinglonga.com> Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/367 Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org> Co-authored-by: Benjamin Fan <benjamesben@noreply.codeberg.org> Co-committed-by: Benjamin Fan <benjamesben@noreply.codeberg.org>
This commit is contained in:
parent
a7eb3e0072
commit
ed8a166ea9
34 changed files with 421 additions and 471 deletions
|
@ -28,41 +28,40 @@ multiple intersections are found.
|
|||
```js
|
||||
({ Point, points, Path, paths, Snippet, snippets, utils, part }) => {
|
||||
|
||||
points.start = new Point(10, 15)
|
||||
points.cp1 = new Point(80, 10)
|
||||
points.cp2 = new Point(-50, 80)
|
||||
points.end = new Point(110, 70)
|
||||
points.start = new Point(10, 15)
|
||||
points.cp1 = new Point(80, 10)
|
||||
points.cp2 = new Point(-50, 80)
|
||||
points.end = new Point(110, 70)
|
||||
|
||||
paths.curve = new Path()
|
||||
.move(points.start)
|
||||
.curve(points.cp1, points.cp2, points.end)
|
||||
paths.curve = new Path()
|
||||
.move(points.start)
|
||||
.curve(points.cp1, points.cp2, points.end)
|
||||
|
||||
for (let x of [30, 40]) {
|
||||
points["from" + x] = new Point(x, 10)
|
||||
points["to" + x] = new Point(x, 80)
|
||||
paths["line" + x] = new Path()
|
||||
.move(points["from" + x])
|
||||
.line(points["to" + x])
|
||||
.addClass("lining dashed")
|
||||
for (let x of [30, 40]) {
|
||||
points["from" + x] = new Point(x, 10)
|
||||
points["to" + x] = new Point(x, 80)
|
||||
paths["line" + x] = new Path()
|
||||
.move(points["from" + x])
|
||||
.line(points["to" + x])
|
||||
.addClass("lining dashed")
|
||||
}
|
||||
|
||||
snippets.i40 = new Snippet(
|
||||
"notch",
|
||||
utils.curveIntersectsX(points.start, points.cp1, points.cp2, points.end, 40)
|
||||
)
|
||||
|
||||
for (let p of utils.curveIntersectsX(
|
||||
points.start,
|
||||
points.cp1,
|
||||
points.cp2,
|
||||
points.end,
|
||||
30
|
||||
))
|
||||
snippets[p.y] = new Snippet("notch", p)
|
||||
|
||||
return part
|
||||
}
|
||||
|
||||
snippets.i40 = new Snippet(
|
||||
"notch",
|
||||
utils.curveIntersectsX(points.start, points.cp1, points.cp2, points.end, 40)
|
||||
)
|
||||
|
||||
for (let p of utils.curveIntersectsX(
|
||||
points.start,
|
||||
points.cp1,
|
||||
points.cp2,
|
||||
points.end,
|
||||
30
|
||||
))
|
||||
snippets[p.y] = new Snippet("notch", p)
|
||||
|
||||
return part
|
||||
}
|
||||
|
||||
```
|
||||
</Example>
|
||||
|
||||
|
@ -73,4 +72,3 @@ This is a low-level (and faster) variant
|
|||
of [`Path.intersectsX()`](/reference/api/path/intersectsx).
|
||||
Instead of a path, you describe a single curve by passing the four
|
||||
points that describes it.
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue