#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# AttributeLite Class

Defined in: `graphics/js/GraphicBase.js:41`
Module: graphics

AttributeLite provides Attribute-like getters and setters for shape classes in the Graphics module. It provides a get/set API without the event infastructure. This class is temporary and a work in progress.

## Constructor

### `AttributeLite`

()

Defined in `graphics/js/GraphicBase.js:41`

- Index
- Methods

## Item Index

### Methods

- _set
- addAttrs
- get
- set

## Methods

### `_set`

(

- `name`
- `value`

)
protected

Defined in `graphics/js/GraphicBase.js:188`

Provides setter logic. Used by `set`.

#### Parameters:

- `name` String | Object

  The name of the attribute. Alternatively, an object of key value pairs can be passed in to set multiple attributes at once.

- `value` Any

  The value to set the attribute to. This value is ignored if an object is received as the name param.

### `addAttrs`

(

- `cfg`

)

Defined in `graphics/js/GraphicBase.js:61`

Initializes the attributes for a shape. If an attribute config is passed into the constructor of the host, the initial values will be overwritten.

#### Parameters:

- `cfg` Object

  Optional object containing attributes key value pairs to be set.

### `get`

(

- `name`

)
Any

Defined in `graphics/js/GraphicBase.js:130`

For a given item, returns the value of the property requested, or undefined if not found.

#### Parameters:

- `name` String

  The name of the item

#### Returns:

Any: The value of the supplied property.

### `set`

(

- `name`
- `value`

)

Defined in `graphics/js/GraphicBase.js:159`

Sets the value of an attribute.

#### Parameters:

- `name` String | Object

  The name of the attribute. Alternatively, an object of key value pairs can be passed in to set multiple attributes at once.

- `value` Any

  The value to set the attribute to. This value is ignored if an object is received as the name param.