2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
title: Attributes
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-29 19:01:10 +02:00
|
|
|
An Attributes object holds attributes for a variety of other objects.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-29 19:01:10 +02:00
|
|
|
## Signature
|
|
|
|
|
|
|
|
```js
|
|
|
|
Attributes new Attributes()
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-29 19:01:10 +02:00
|
|
|
The Attributes constructor takes no arguments.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-29 19:01:10 +02:00
|
|
|
## Methods
|
2021-08-25 16:09:31 +02:00
|
|
|
An Attributes object exposes the following methods:
|
|
|
|
|
|
|
|
<ReadMore list />
|
2022-09-29 19:01:10 +02:00
|
|
|
|
|
|
|
## Notes
|
|
|
|
|
|
|
|
Attributes are attached to [`Point`](/reference/api/point),
|
|
|
|
[`Path`](/reference/api/path), and [`Snippet`](/reference/api/snippet) objects,
|
|
|
|
as well as the internal [`Svg`](/reference/api/svg) object.
|
|
|
|
|
|
|
|
All of these have an instantiated Attributes object in their `attributes`
|
|
|
|
property, as well as a number of (chainable) helper methods to manipulate the
|
|
|
|
attributes. You will typically use these higher-level method and thus are
|
|
|
|
unlikely to interact with an Attributes object directly.
|