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

DiscreteAnimation

MikhailTymchukDX edited this page Apr 12, 2017 · 2 revisions

DiscreteAnimation (inherits PropertyAnimation)

The DiscreteAnimation inherits from Sys.Extended.UI.Animation.PropertyAnimation and sets the value of the property to the elements in a provided array of values.

Client properties

Name Description
values Array of possible values of the property that will be iterated over as the animation is played

Client methods

Name Description
constructor(target, duration, fps, property, propertyKey, values)
getAnimatedValue(percentage) Assign the value whose index corresponds to the current percentage.

Client properties

values

Array of possible values of the property that will be iterated over as the animation is played

Getter name: get_values()
Setter name: set_values(value)

Client methods

constructor(target, duration, fps, property, propertyKey, values)

Params:

  • target

    • Type: Object
    • Description: Length of the animation in seconds. The default is 1.
  • 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.
  • property

    • Type: Object
    • Description: Property of the target element to set when animating.
  • propertyKey

    • Type: Object
    • Description: optional key of the property to be set (which indicates the value property[propertyKey], like style['backgroundColor']). Note that for the style property, the key must be in a JavaScript friendly format (i.e. backgroundColor instead of background-color).
  • values

    • Type: Object
    • Description: Array of possible values of the property that will be iterated over as the animation is played.

getAnimatedValue(percentage)

Assign the value whose index corresponds to the current percentage.

Params:

  • percentage
    • Type: Number
    • Description: Percentage of the animation already complete.
Clone this wiki locally