Skip to content
MikhailTymchukDX edited this page Aug 25, 2016 · 1 revision

StyleAction (inherits Action)

The StyleAction is used to set a particular attribute of the target's style.

Client properties

Name Description
attribute Style attribute to set (this must be in a JavaScript friendly format, i.e. backgroundColor instead of background-color).
value Value to set the attribute.

Client methods

Name Description
.ctor(target, duration, fps, attribute, value)
doAction() Assigns the value to the style's attribute.

Client properties

attribute

Style attribute to set (this must be in a JavaScript friendly format, i.e. backgroundColor instead of background-color).

Getter name: get_attribute()
Setter name: set_attribute(value)

value

Value to set the attribute.

Getter name: get_value()
Setter name: set_value(value)

Client methods

.ctor(target, duration, fps, attribute, value)

Params:

  • target

    • Type: Object
    • Description: Target of the animation.
  • duration

    • Type: Number
    • Description: Length of the animation in seconds. The default is 1.
  • fps

    • Type: Number
    • Description: Number of steps per second. The default is 25.
  • attribute

    • Type: String
    • Description: Style attribute to set (this must be in a JavaScript friendly format, i.e. backgroundColor instead of background-color).
  • value

    • Type: Object
    • Description: Value to set the attribute.

doAction()

Assigns the value to the style's attribute.

Clone this wiki locally