1
0
Fork 0

Revert "chore: Linting for markdown and js"

This reverts commit 1c92e0f655.
This commit is contained in:
joostdecock 2021-10-17 18:26:00 +02:00
parent 994874fa72
commit cba1ab19c8
6627 changed files with 25791 additions and 24211 deletions

View file

@ -1,6 +1,6 @@
***
## title: "\_curve()"
---
title: "_curve()"
---
```js
Path path._curve(Point cp2, Point to)

View file

@ -1,6 +1,6 @@
***
## title: attr()
---
title: attr()
---
```js
Path path.attr(

View file

@ -1,6 +1,7 @@
***
---
title: clone()
---
## title: clone()
```js
Path path.clone()
@ -29,3 +30,4 @@ paths.clone = paths.example
.attr("class", "note lashed stroke-l")
.attr("style", "stroke-opacity: 0.5");
```

View file

@ -1,6 +1,6 @@
***
## title: close()
---
title: close()
---
```js
Path path.close()
@ -25,3 +25,4 @@ paths.line = new Path()
.attr("data-text", "Path._close()")
.attr("data-text-class", "text-sm right fill-note");
```

View file

@ -1,6 +1,6 @@
***
## title: curve()
---
title: curve()
---
```js
Path path.curve(Point cp1, Point cp2, Point to)

View file

@ -1,6 +1,6 @@
***
## title: "curve\_()"
---
title: "curve_()"
---
```js
Path path.curve_(Point cp1, Point to)

View file

@ -1,6 +1,6 @@
***
## title: divide()
---
title: divide()
---
```js
array path.divide()

View file

@ -1,6 +1,6 @@
***
## title: edge()
---
title: edge()
---
```js
Point path.edge(string side)
@ -8,14 +8,14 @@ Point path.edge(string side)
Returns the Point object at the edge of the path you specify. Edge must be one of:
* `top`
* `bottom`
* `left`
* `right`
* `topLeft`
* `topRight`
* `bottomLeft`
* `bottomRight`
- `top`
- `bottom`
- `left`
- `right`
- `topLeft`
- `topRight`
- `bottomLeft`
- `bottomRight`
<Example part="path_edge" caption="Example of the Path.edge() method" />
@ -48,3 +48,4 @@ for (let i of [
"right"
]) snippets[i] = new Snippet("notch", paths.demo.edge(i));
```

View file

@ -1,10 +1,9 @@
***
---
title: Path
order: 30
---------
---
A path represents an SVG path; The lines and curves on our pattern.
A path represents an SVG path; The lines and curves on our pattern.
The Path constructor takes no arguments:
@ -14,8 +13,8 @@ Path new Path();
A Path objects comes with the following properties:
* `render` : Set this to `false` to not render the path (exclude it from the output)
* `attributes` : An [Attributes](/reference/api/attributes) instance holding the path's attributes
- `render` : Set this to `false` to not render the path (exclude it from the output)
- `attributes` : An [Attributes](/reference/api/attributes) instance holding the path's attributes
In addition, a Path object exposes the following methods:

View file

@ -1,6 +1,6 @@
***
## title: end()
---
title: end()
---
```js
Point path.end()

View file

@ -1,6 +1,6 @@
***
## title: insop()
---
title: insop()
---
```js
Path path.insop(string id, Path path)

View file

@ -1,8 +1,10 @@
***
---
title: intersects()
---
## title: intersects()
array|false path.intersects(Path path)
```
array|false path.intersects(Path path)
```
Returns the Point object(s) where the path intersects with a path you pass it.
@ -53,3 +55,4 @@ for (let p of paths.demo1.intersects(paths.demo2)) {
snippets[part.getId()] = new Snippet("notch", p);
}
```

View file

@ -1,6 +1,6 @@
***
## title: intersectsX()
---
title: intersectsX()
---
```js
array|false path.intersectsX(float x)

View file

@ -1,6 +1,6 @@
***
## title: intersectsY()
---
title: intersectsY()
---
```js
array|false path.intersectsY(float y)

View file

@ -1,6 +1,6 @@
***
## title: join()
---
title: join()
---
```js
Path path.join(path other)
@ -40,3 +40,4 @@ paths.joint = paths.path1
.attr("class", "note lashed stroke-l")
.attr("style", "stoke-opacity: 0.5");
```

View file

@ -1,6 +1,6 @@
***
## title: length()
---
title: length()
---
```js
float path.length()

View file

@ -1,6 +1,6 @@
***
## title: line()
---
title: line()
---
```js
Path path.line(Point to)

View file

@ -1,23 +1,24 @@
***
## title: move()
---
title: move()
---
```js
Path path.move(Point to)
```
Moves to a given point without drawing a line.
Moves to a given point without drawing a line.
<Tip>
###### Always start your path with a move
When drawing a path, you must always start with a `move()` call,
When drawing a path, you must always start with a `move()` call,
followed by your `line()` and/or `curve()` calls
and an optional `close()` call.
These calls are chainable, making your code easier to read:
```js
paths.example = new Path()
.move(points.a)
@ -28,6 +29,7 @@ paths.example = new Path()
</Tip>
<Example part="path_move" caption="Example of the Path.move() method" />
```js

View file

@ -1,12 +1,12 @@
***
## title: noop()
---
title: noop()
---
```js
Path path.noop(string id)
```
Adds a placeholder path opertion.\
Adds a placeholder path opertion.
A `noop` operation does nothing, but is intended to be replaced later with [`Path.insop()`](#insop).
<Fixme>Add example</Fixme>

View file

@ -1,7 +1,7 @@
***
## title: offset()
---
title: offset()
---
```js
Path path.offset(float distance)
```

View file

@ -1,6 +1,6 @@
***
## title: reverse()
---
title: reverse()
---
```js
Path path.reverse()
@ -10,7 +10,7 @@ Returns a path that is the reversed version of this path. As in, start becomes e
<Note>
The reversed path is a shallow copy.
The reversed path is a shallow copy.
It will in other words not inherit the attributes of the original path.
If you want a deep copy, including the attributes, use `Path.clone().reverse()`.

View file

@ -1,6 +1,6 @@
***
## title: setRender()
---
title: setRender()
---
```js
Path path.setRender(bool render)

View file

@ -1,6 +1,6 @@
***
## title: shiftAlong()
---
title: shiftAlong()
---
```js
Point path.shiftAlong(float distance[, int stepsPerMm=25])

View file

@ -1,6 +1,6 @@
***
## title: shiftFractionAlong()
---
title: shiftFractionAlong()
---
```js
Point path.shiftFractionAlong(float fraction[, int stepsPerMm=25])
@ -9,8 +9,8 @@ Point path.shiftFractionAlong(float fraction[, int stepsPerMm=25])
Returns a point that lies at fraction of the length of the path travelled along the path.
<Example
part="path_shiftfractionalong"
caption="Example of the Path.shiftFractionAlong() method"
part="path_shiftfractionalong"
caption="Example of the Path.shiftFractionAlong() method"
/>
```js
@ -53,3 +53,4 @@ If you don't need that precision, you can pass a lower number.
But for most cases, you can just ignore it.
</Note>

View file

@ -1,7 +1,7 @@
***
## title: split
---
title: split
---
```js
array path.split(Point splitPoint)
```
@ -9,8 +9,8 @@ array path.split(Point splitPoint)
Splits a path in two halves, on a point along that path that you pass it.
<Example
part="path_split"
caption="Example of the Path.split() method"
part="path_split"
caption="Example of the Path.split() method"
/>
```js

View file

@ -1,6 +1,6 @@
***
## title: start()
---
title: start()
---
```js
Point path.start()
@ -9,8 +9,8 @@ Point path.start()
Returns the Point object at the start of the path.
<Example
part="path_start"
caption="Example of the Path.start() method"
part="path_start"
caption="Example of the Path.start() method"
/>
```js

View file

@ -1,18 +1,18 @@
***
## title: translate()
---
title: translate()
---
```js
Path path.translate(float deltaX, float deltaY)
```
Returns a path with
Returns a path with
[a translate transform](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform#Translate)
applied.
<Example
part="path_translate"
caption="Example of the Path.translate() method"
part="path_translate"
caption="Example of the Path.translate() method"
/>
```js

View file

@ -1,6 +1,6 @@
***
## title: trim()
---
title: trim()
---
```js
Path path.trim()
@ -19,18 +19,18 @@ it on a long/complex path will be significant.
To limit the impact of path.trim(), follow this approach:
* construct a minimal path that contains the overlap
* trim it
* now join it to the rest of your path
- construct a minimal path that contains the overlap
- trim it
- now join it to the rest of your path
You can see an example of this
You can see an example of this
[in the front part of the Bruce pattern](https://github.com/freesewing/freesewing/blob/develop/packages/bruce/src/front.js#L195).
</Warning>
<Example
part="path_trim"
caption="Example of the Path.trim() method"
part="path_trim"
caption="Example of the Path.trim() method"
/>
```js