2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: clone()
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
|
|
|
Attributes attributes.clone()
|
|
|
|
```
|
|
|
|
|
|
|
|
Returns a new Attributes object that is a deep copy of this one.
|
|
|
|
|
|
|
|
```js
|
|
|
|
let { Path, paths } = part.shorthand();
|
|
|
|
|
|
|
|
paths.demo = new Path()
|
|
|
|
.attr('class', 'classA')
|
|
|
|
.attr('class', 'classB');
|
|
|
|
|
|
|
|
paths.clone = paths.demo.clone()
|
|
|
|
```
|