AttributeLite Class
yui3/src/graphics/js/GraphicBase.js:41
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
()
Methods
_set
-
name
-
value
Provides setter logic. Used by set
.
Parameters:
-
name
String | ObjectThe name of the attribute. Alternatively, an object of key value pairs can be passed in to set multiple attributes at once.
-
value
AnyThe value to set the attribute to. This value is ignored if an object is received as the name param.
addAttrs
-
cfg
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
ObjectOptional object containing attributes key value pairs to be set.
get
-
name
For a given item, returns the value of the property requested, or undefined if not found.
Parameters:
-
name
StringThe name of the item
Returns:
The value of the supplied property.
set
-
name
-
value
Sets the value of an attribute.
Parameters:
-
name
String | ObjectThe name of the attribute. Alternatively, an object of key value pairs can be passed in to set multiple attributes at once.
-
value
AnyThe value to set the attribute to. This value is ignored if an object is received as the name param.