Yahoo! UI Library

codecola-degree  1.0.0

Yahoo! UI Library > codecola-degree > Y.codecolaDegree
Search:
 
Filters

Class Y.codecolaDegree - extends Widget

a degree control for css3 property

Constructor

Y.codecolaDegree ( config )
Parameters:
config <Object> Object literal specifying codecolaDegree configuration properties.

Methods

able

void able ( )
able all controls
Returns: void
Chainable: This method is chainable.

disable

void disable ( )
disable all controls
Returns: void
Chainable: This method is chainable.

getDegree

Number getDegree ( )
return the current degree
Returns: Number

reset

void reset ( )
reset all, degree is 0, will not run onChange
Returns: void
Chainable: This method is chainable.

setDegree

void setDegree ( param.degree )
update the attribute 'degree', init all the controls, fire the onChange event
Parameters:
param.degree <Object> for update the attribute 'degree'
Returns: void
Chainable: This method is chainable.

Events

degreeChange

degreeChange ( event )
Fires when the value for the configuration attribute 'degree' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

onChangeChange

onChangeChange ( event )
Fires when the value for the configuration attribute 'onChange' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

onInitChange

onInitChange ( event )
Fires when the value for the configuration attribute 'onInit' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

wrapChange

wrapChange ( event )
Fires when the value for the configuration attribute 'wrap' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Configuration Attributes

degree - Number

degree for init, degree is a number from -180 to 180
Default Value: 0

onChange - Function

callback when degree change
Default Value: function(){}

onInit - Function

callback when widget init
Default Value: function(){}

wrap - String

a css selector for Y.one(),controls will insert into the wrap
Default Value: 'body'


Copyright © 2011 Yahoo! Inc. All rights reserved.