Skip to content
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.

StyleAction

MikhailTymchukDX edited this page Apr 12, 2017 · 2 revisions

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 The attribute's value.

Client methods

Name Description
constructor(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

The attribute's value.

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

Client methods

constructor(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