1
0
Fork 0

fix(dev): One-liner admonitions

This commit is contained in:
Joost De Cock 2024-09-29 07:14:59 +02:00
parent a6d656c19e
commit da41cc0fc9
60 changed files with 860 additions and 659 deletions

View file

@ -12,7 +12,9 @@ Path path.setText(string text, string className = '')
The second argument will optionally be used to set the CSS class for the text.
:::tipThis method is chainable as it returns the `Path` object:::
:::tip
This method is chainable as it returns the `Path` object
:::
## Example
@ -22,14 +24,15 @@ The second argument will optionally be used to set the CSS class for the text.
points.from = new Point(5, 10)
points.to = new Point(95, 10)
paths.line = new Path()
.move(points.from)
.line(points.to)
.setText('FreeSewing rocks')
paths.line = new Path()
.move(points.from)
.line(points.to)
.setText('FreeSewing rocks')
return part
return part
}
```
````
</Example>
## Notes
@ -40,7 +43,7 @@ as the two following calls yield the same result:
```js
path.attr('data-text', 'Hello')
path.setText('Hello')
```
````
The difference with [Path.addText()](/reference/api/path/addtext) is that this
method will overwrite existing text on the path, whereas `Path.addText()` will