fix(markdown): Move caption to children
This commit is contained in:
parent
76d13e3fa3
commit
7bebd8cf07
96 changed files with 304 additions and 213 deletions
|
@ -24,7 +24,9 @@ So the only purpose of this method is to save your some typing.
|
|||
|
||||
</Tip>
|
||||
|
||||
<Example part="path__curve" caption="Example of the Path._curve() method" />
|
||||
<Example part="path__curve">
|
||||
Example of the Path.\_curve() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -16,7 +16,9 @@ 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="path_attr" caption="Example of the Path.attr() method" />
|
||||
<Example part="path_attr">
|
||||
Example of the Path.attr() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -9,7 +9,9 @@ Path path.clone()
|
|||
|
||||
Returns a new Path that is a deep copy of this path.
|
||||
|
||||
<Example part="path_clone" caption="Example of the Path.clone() method" />
|
||||
<Example part="path_clone">
|
||||
Example of the Path.clone() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ Path path.close()
|
|||
|
||||
Closes a path by drawing a straight line from the current position to the path's start.
|
||||
|
||||
<Example part="path_close" caption="Example of the Path.close() method" />
|
||||
<Example part="path_close">
|
||||
Example of the Path.close() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ Path path.curve(Point cp1, Point cp2, Point to)
|
|||
|
||||
Draws a cubic Bezier curve from the current position via two control points to a given endpoint.
|
||||
|
||||
<Example part="path_curve" caption="Example of the Path.curve() method" />
|
||||
<Example part="path_curve">
|
||||
Example of the Path.curve() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -24,7 +24,9 @@ So the only purpose of this method is to save your some typing;
|
|||
|
||||
</Tip>
|
||||
|
||||
<Example part="path_curve_" caption="Example of the Path.curve_() method" />
|
||||
<Example part="path_curve_">
|
||||
Example of the Path.curve\_() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -9,7 +9,9 @@ array path.divide()
|
|||
Breaks a path apart in an array of atomic paths. An atomic path is a path that can't be divided further and is
|
||||
always made up of one move + one drawing operation.
|
||||
|
||||
<Example part="path_divide" caption="Example of the Path.divide() method" />
|
||||
<Example part="path_divide">
|
||||
Example of the Path.divide() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -17,7 +17,9 @@ Returns the Point object at the edge of the path you specify. Edge must be one o
|
|||
- `bottomLeft`
|
||||
- `bottomRight`
|
||||
|
||||
<Example part="path_edge" caption="Example of the Path.edge() method" />
|
||||
<Example part="path_edge">
|
||||
Example of the Path.edge() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ Point path.end()
|
|||
|
||||
Returns the Point object at the end of the path.
|
||||
|
||||
<Example part="path_end" caption="Example of the Path.end() method" />
|
||||
<Example part="path_end">
|
||||
Example of the Path.end() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -19,7 +19,9 @@ If you do know, use one of the intersection methods in [Utils](/reference/api/ut
|
|||
|
||||
</Tip>
|
||||
|
||||
<Example part="path_intersects" caption="Example of the Path.intersects() method" />
|
||||
<Example part="path_intersects">
|
||||
Example of the Path.intersects() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ array|false path.intersectsX(float x)
|
|||
|
||||
Returns the Point object(s) where the path intersects with a given X-value.
|
||||
|
||||
<Example part="path_intersectsx" caption="Example of the Path.intersectsX() method" />
|
||||
<Example part="path_intersectsx">
|
||||
Example of the Path.intersectsX() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ array|false path.intersectsY(float y)
|
|||
|
||||
Returns the Point object(s) where the path intersects with a given Y-value.
|
||||
|
||||
<Example part="path_intersectsy" caption="Example of the Path.intersectsY() method" />
|
||||
<Example part="path_intersectsy">
|
||||
Example of the Path.intersectsY() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -14,7 +14,9 @@ You cannot join a closed path to another path
|
|||
|
||||
</Warning>
|
||||
|
||||
<Example part="path_join" caption="Example of the Path.join() method" />
|
||||
<Example part="path_join">
|
||||
Example of the Path.join() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ float path.length()
|
|||
|
||||
Returns the length of the path.
|
||||
|
||||
<Example part="path_length" caption="Example of the Path.length() method" />
|
||||
<Example part="path_length">
|
||||
Example of the Path.length() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, macro } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ Path path.line(Point to)
|
|||
|
||||
Draws a straight line from the current position to a given point.
|
||||
|
||||
<Example part="path_line" caption="Example of the Path.line() method" />
|
||||
<Example part="path_line">
|
||||
Example of the Path.line() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -30,7 +30,9 @@ paths.example = new Path()
|
|||
</Tip>
|
||||
|
||||
|
||||
<Example part="path_move" caption="Example of the Path.move() method" />
|
||||
<Example part="path_move">
|
||||
Example of the Path.move() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ Path path.offset(float distance)
|
|||
|
||||
Returns a new Path that is offset by distance from the original path.
|
||||
|
||||
<Example part="path_offset" caption="Example of the Path.offset() method" />
|
||||
<Example part="path_offset">
|
||||
Example of the Path.offset() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -17,7 +17,9 @@ If you want a deep copy, including the attributes, use `Path.clone().reverse()`.
|
|||
|
||||
</Note>
|
||||
|
||||
<Example part="path_reverse" caption="Example of the Path.reverse() method" />
|
||||
<Example part="path_reverse">
|
||||
Example of the Path.reverse() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
|
@ -8,7 +8,9 @@ Point path.shiftAlong(float distance[, int stepsPerMm=25])
|
|||
|
||||
Returns a point that lies at distance travelled along the path.
|
||||
|
||||
<Example part="path_shiftalong" caption="Example of the Path.shiftAlong() method" />
|
||||
<Example part="path_shiftalong">
|
||||
Example of the Path.shiftAlong() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -8,10 +8,9 @@ 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"
|
||||
/>
|
||||
<Example part="path_shiftfractionalong">
|
||||
Example of the Path.shiftFractionAlong() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -8,10 +8,9 @@ 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"
|
||||
/>
|
||||
<Example part="path_split">
|
||||
Example of the Path.split() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -8,10 +8,9 @@ Point path.start()
|
|||
|
||||
Returns the Point object at the start of the path.
|
||||
|
||||
<Example
|
||||
part="path_start"
|
||||
caption="Example of the Path.start() method"
|
||||
/>
|
||||
<Example part="path_start">
|
||||
Example of the Path.start() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand();
|
||||
|
|
|
@ -10,10 +10,9 @@ 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"
|
||||
/>
|
||||
<Example part="path_translate">
|
||||
Example of the Path.translate() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths, macro } = part.shorthand();
|
||||
|
|
|
@ -28,10 +28,9 @@ You can see an example of this
|
|||
|
||||
</Warning>
|
||||
|
||||
<Example
|
||||
part="path_trim"
|
||||
caption="Example of the Path.trim() method"
|
||||
/>
|
||||
<Example part="path_trim">
|
||||
Example of the Path.trim() method
|
||||
</Example>
|
||||
|
||||
```js
|
||||
let { Point, points, Path, paths } = part.shorthand();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue