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
void
able
(
)
able all controls
- Returns:
void
Chainable: This method is chainable.
void
disable
(
)
disable all controls
- Returns:
void
Chainable: This method is chainable.
Number
getDegree
(
)
return the current degree
void
reset
(
)
reset all, degree is 0, will not run onChange
- Returns:
void
Chainable: This method is chainable.
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
(
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
(
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
(
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
(
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 for init, degree is a number from -180 to 180
Default Value: 0
callback when degree change
Default Value: 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'