fix(dev): One-liner admonitions
This commit is contained in:
parent
a6d656c19e
commit
da41cc0fc9
60 changed files with 860 additions and 659 deletions
|
@ -11,7 +11,9 @@ attributes as the original point.
|
|||
Point point.clone()
|
||||
```
|
||||
|
||||
:::tipThis method is chainable as it returns the `Point` object:::
|
||||
:::tip
|
||||
This method is chainable as it returns the `Point` object
|
||||
:::
|
||||
|
||||
## Example
|
||||
|
||||
|
@ -19,21 +21,22 @@ Point point.clone()
|
|||
```js
|
||||
({ Point, points, Path, paths, Snippet, snippets, part }) => {
|
||||
|
||||
points.A = new Point(25, 25)
|
||||
.setText("Point A", "text-xl")
|
||||
.attr("data-text-fill-opacity", "0.5")
|
||||
points.B = points.A.clone().setText("Point B")
|
||||
points.A = new Point(25, 25)
|
||||
.setText("Point A", "text-xl")
|
||||
.attr("data-text-fill-opacity", "0.5")
|
||||
points.B = points.A.clone().setText("Point B")
|
||||
|
||||
snippets.x = new Snippet("notch", points.A)
|
||||
snippets.x = new Snippet("notch", points.A)
|
||||
|
||||
// Avoid the text getting cropped
|
||||
paths.hidden = new Path()
|
||||
.move(new Point(20,10))
|
||||
.move(new Point(75,30))
|
||||
.addClass('hidden')
|
||||
// Avoid the text getting cropped
|
||||
paths.hidden = new Path()
|
||||
.move(new Point(20,10))
|
||||
.move(new Point(75,30))
|
||||
.addClass('hidden')
|
||||
|
||||
return part
|
||||
return part
|
||||
}
|
||||
|
||||
```
|
||||
</Example>
|
||||
|
||||
|
@ -43,3 +46,4 @@ Point point.clone()
|
|||
The [`Point.copy()`](/reference/api/point/copy/) method will only copy the
|
||||
point's coordinates, whereas this `Point.clone()` method will also copy its
|
||||
attributes.
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue