chore(docs): Updated Path api docs for v3
This commit is contained in:
parent
3cb5384df5
commit
ede3c137bc
40 changed files with 1192 additions and 948 deletions
|
@ -4,31 +4,17 @@ title: Path.addClass()
|
|||
|
||||
The `Path.addClass()` method adds a CSS class to the path.
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
Path path.addClass(string className)
|
||||
```
|
||||
|
||||
<Tip | compact>This method is chainable as it returns the `Path` object</Tip>
|
||||
<Tip compact>This method is chainable as it returns the `Path` object</Tip>
|
||||
|
||||
<Tip>
|
||||
|
||||
###### This method exists to save you some typing
|
||||
|
||||
Note that the two following calls yield the same result:
|
||||
|
||||
```js
|
||||
path.attr('class', 'fabric')
|
||||
path.addClass('fabric')
|
||||
```
|
||||
|
||||
So the only purpose of this method is to save your some typing.
|
||||
|
||||
</Tip>
|
||||
|
||||
<Example part="path_addclass">
|
||||
Example of the Path.addClass() method
|
||||
</Example>
|
||||
## Example
|
||||
|
||||
<Example caption="Example of the Path.addClass() method">
|
||||
```js
|
||||
({ Point, points, Path, paths, part }) => {
|
||||
|
||||
|
@ -43,3 +29,15 @@ Example of the Path.addClass() method
|
|||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
||||
## Notes
|
||||
|
||||
The main purpose of this method is to save your some typing,
|
||||
as the two following calls yield the same result:
|
||||
|
||||
```js
|
||||
path.attr('class', 'fabric')
|
||||
path.addClass('fabric')
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue