跳到主要内容

Attributes

An Attributes object holds attributes for a variety of other objects.

Signature​

Attributes new Attributes()

The Attributes constructor takes no arguments.

Properties​

An Attributes object comes with the following property:

  • list : Holds the internal object in which attributes are stored

Methods​

An Attributes object exposes the following methods:

Notes​

Attributes are attached to Point, Path, and Snippet objects, 以及 the internal Svg object.

All of these have an instantiated Attributes object in their attributes property, 以及 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.