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,16 +1,16 @@
***
## title: angle()
---
title: angle()
---
```js
float point.angle(Point point)
```
```
Returns the angle made by a line from this point to the point you pass it.
<Example
part="point_angle"
caption="An example of the Point.angle() method"
part="point_angle"
caption="An example of the Point.angle() method"
/>
```js
@ -28,3 +28,4 @@ paths.line = new Path()
.line(points.moon)
.attr("class", "dashed");
```

View file

@ -1,6 +1,6 @@
***
## title: attr()
---
title: attr()
---
```js
Point point.attr(
@ -16,8 +16,8 @@ This allows you to chain different calls together as in the example below.
If the third parameter is set to `true` it will call `this.attributes.set()` instead, thereby overwriting the value of the attribute.
<Example
part="point_attr"
caption="An example of the Point.attr() method"
part="point_attr"
caption="An example of the Point.attr() method"
/>
```js
@ -27,3 +27,4 @@ points.anchor = new Point(100, 25)
.attr("data-text", "freesewingIsMadeByJoostDeCockAndContributors")
.attr("data-text-class", "center");
```

View file

@ -1,8 +1,10 @@
***
---
title: clone()
---
## title: clone()
Point point.clone()
```
Point point.clone()
```
Returns a new point with the same coordinates and attributes as this point.
@ -16,8 +18,8 @@ The `Point.copy()` method will only copy the point's coordinates, whereas this
</Note>
<Example
part="point_clone"
caption="An example of the Point.clone() method"
part="point_clone"
caption="An example of the Point.clone() method"
/>
```js
@ -31,3 +33,4 @@ caption="An example of the Point.clone() method"
snippets.x = new Snippet("notch", points.A);
```

View file

@ -1,6 +1,6 @@
***
## title: copy()
---
title: copy()
---
```js
Point point.copy()
@ -9,8 +9,8 @@ Point point.copy()
Returns a new point with the same coordinates as this point.
<Example
part="point_copy"
caption="An example of the Point.copy() method"
part="point_copy"
caption="An example of the Point.copy() method"
/>
```js
@ -23,3 +23,4 @@ points.B = points.A.copy().attr("data-text", "Point B");
snippets.x = new Snippet("notch", points.A);
```

View file

@ -1,6 +1,6 @@
***
## title: dx()
---
title: dx()
---
```js
float point.dx(Point point)
@ -9,8 +9,8 @@ float point.dx(Point point)
Returns the delta along the X-axis between this point and the point you pass it.
<Example
part="point_dx"
caption="An example of the Point.dx() method"
part="point_dx"
caption="An example of the Point.dx() method"
/>
```js
@ -42,3 +42,4 @@ paths.line_dy = new Path()
.line(points.totop)
.attr("class", "dashed")
```

View file

@ -1,6 +1,6 @@
***
## title: dy()
---
title: dy()
---
```js
float point.dy(Point point)
@ -9,8 +9,8 @@ float point.dy(Point point)
Returns the delta along the Y-axis between this point and the point you pass it.
<Example
part="point_dy"
caption="An example of the Point.dy() method"
part="point_dy"
caption="An example of the Point.dy() method"
/>
```js

View file

@ -1,21 +1,20 @@
***
---
title: Point
order: 25
---------
---
A Point object represents a point on a 2D plane with an X and Y axis.
Point objects come with the following properties:
* `x` : The X-coordinate of the point
* `y` : The Y-coordinate of the point
* `attributes` : An [Attributes](../attributes) instance holding the point's attributes
- `x` : The X-coordinate of the point
- `y` : The Y-coordinate of the point
- `attributes` : An [Attributes](../attributes) instance holding the point's attributes
The point constructor takes two arguments:
* `x` : The X-coordinate of the point
* `y` : The Y-coordinate of the point
- `x` : The X-coordinate of the point
- `y` : The Y-coordinate of the point
```js
Point new Point(x, y);

View file

@ -1,6 +1,6 @@
***
## title: flipX()
---
title: flipX()
---
```js
Point point.flipX(Point mirror = false)
@ -11,8 +11,8 @@ Returns a new point that mirrors this point around the X-value of the point your
If you don't pass it a point, it will mirror around an X-value of zero.
<Example
part="point_flipx"
caption="An example of the Point.flipX() method"
part="point_flipx"
caption="An example of the Point.flipX() method"
/>
```js
@ -61,3 +61,4 @@ paths.mirror = new Path()
.line(points.bottom)
.attr("class", "note dashed");
```

View file

@ -1,6 +1,6 @@
***
## title: flipY()
---
title: flipY()
---
```js
Point point.flipY(Point mirror = false)
@ -13,8 +13,8 @@ If you don't pass it a point, it will mirror around a Y-value of zero.
### Point.flipY() example
<Example
part="point_flipy"
caption="An example of the Point.flipY() method"
part="point_flipy"
caption="An example of the Point.flipY() method"
/>
```js
@ -68,3 +68,4 @@ paths.skylineTop = new Path()
.line(points.houseWallRight)
.line(points.end);
```

View file

@ -1,16 +1,16 @@
***
## title: rotate()
---
title: rotate()
---
```js
Point point.rotate(float angle, Point center)
```
```
Rotates a point the number of degrees you pass it around the point you pass it.
<Example
part="point_rotate"
caption="An example of the Point.rotate() method"
part="point_rotate"
caption="An example of the Point.rotate() method"
/>
```js

View file

@ -1,6 +1,6 @@
***
## title: shift()
---
title: shift()
---
```js
Point point.shift(float degrees, float distance)
@ -9,8 +9,8 @@ Point point.shift(float degrees, float distance)
Returns a point that lies distance in the direction of degrees from this point.
<Example
part="point_shift"
caption="An example of the Point.shift() method"
part="point_shift"
caption="An example of the Point.shift() method"
/>
```js

View file

@ -1,6 +1,6 @@
***
## title: shiftFractionTowards()
---
title: shiftFractionTowards()
---
```js
Point point.shiftFractionTowards(Point target, float fraction)
@ -9,8 +9,8 @@ Point point.shiftFractionTowards(Point target, float fraction)
Returns a point that is shifted towards the target by a fraction of the distance between this point and the target.
<Example
part="point_shiftfractiontowards"
caption="An example of the Point.shiftFractionTowards() method"
part="point_shiftfractiontowards"
caption="An example of the Point.shiftFractionTowards() method"
/>
```js

View file

@ -1,6 +1,6 @@
***
## title: shiftOutwards()
---
title: shiftOutwards()
---
```js
Point point.shiftOutwards(Point direction, float distance)
@ -9,8 +9,8 @@ Point point.shiftOutwards(Point direction, float distance)
Returns a point that is shifted distance beyond target in the direction of target.
<Example
part="point_shiftoutwards"
caption="An example of the Point.shiftOutwards() method"
part="point_shiftoutwards"
caption="An example of the Point.shiftOutwards() method"
/>
```js

View file

@ -1,6 +1,6 @@
***
## title: shiftTowards()
---
title: shiftTowards()
---
```js
Point point.shiftTowards(Point target, float distance)
@ -9,8 +9,8 @@ Point point.shiftTowards(Point target, float distance)
Returns a point that lies distance in the direction of target.
<Example
part="point_shifttowards"
caption="An example of the Point.shiftTowards() method"
part="point_shifttowards"
caption="An example of the Point.shiftTowards() method"
/>
```js

View file

@ -1,6 +1,6 @@
***
## title: sitsOn()
---
title: sitsOn()
---
```js
bool point.sitsOn(Point check)
@ -9,8 +9,8 @@ bool point.sitsOn(Point check)
Returns true if the point has the same coordinates as the one you pass to it.
<Example
part="point_sitson"
caption="An example of the Point.sitsOn() method"
part="point_sitson"
caption="An example of the Point.sitsOn() method"
/>
```js

View file

@ -1,6 +1,6 @@
***
## title: sitsRoughlyOn()
---
title: sitsRoughlyOn()
---
```js
bool point.sitsRoughlyOn(Point check)
@ -12,14 +12,14 @@ Returns true is the point has roughly the same coordinates as the one you pass t
###### How rough?
The difference between this method and [Point.sitsOn](/reference/api/point/sitson/) is
The difference between this method and [Point.sitsOn](/reference/api/point/sitson/) is
that this one rounds things down to the nearest integer (thus mm) before checking.
</Note>
<Example
part="point_sitsroughlyon"
caption="An example of the Point.sitsRoughlyOn() method"
part="point_sitsroughlyon"
caption="An example of the Point.sitsRoughlyOn() method"
/>
```js

View file

@ -1,23 +1,23 @@
***
## title: translate()
---
title: translate()
---
```js
Point point.translate(float deltaX, float deltaY)
```
Returns a point with
[a translate transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate)
applied.
Returns a point with
[a translate transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate)
applied.
In other words, this will:
* Add `deltaX` to the point's X-coordinate
* Add `deltaY` to the point's Y-coordinate
- Add `deltaX` to the point's X-coordinate
- Add `deltaY` to the point's Y-coordinate
<Example
part="point_translate"
caption="An example of the Point.translate() method"
part="point_translate"
caption="An example of the Point.translate() method"
/>
```js