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

FadeAnimation

MikhailTymchukDX edited this page Apr 12, 2017 · 2 revisions

FadeAnimation (inherits Animation)

The FadeAnimation is used to fade an element in or out of view, depending on the provided Sys.Extended.UI.Animation.FadeEffect, by settings its opacity. The minimum and maximum opacity values can be specified to precisely control the fade. You may also consider using FadeInAnimation or FadeOutAnimation if you know the only direction you are fading.

Client properties

Name Description
effect Determine whether to fade the element in or fade the element out. The possible values are FadeIn and FadeOut. The default value is FadeOut.
forceLayoutInIE Whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its background color (the latter is required in case the user has ClearType enabled). The default value is true. This is obviously ignored when working in other browsers.
maximumOpacity Maximum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 1.
minimumOpacity Minimum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 0.

Client methods

Name Description
constructor(target, duration, fps, effect, minimumOpacity, maximumOpacity, forceLayoutInIE)
getAnimatedValue(percentage) Determine the current opacity after the given percentage of its duration has elapsed.
onStart() The onStart method is called just before the animation is played each time.
setStartValue(value) Set the start value (so that child animations can set the current opacity as the start value when fading in or out).
setValue(value) Set the current opacity of the element.

Client properties

effect

Determine whether to fade the element in or fade the element out. The possible values are FadeIn and FadeOut. The default value is FadeOut.

Getter name: get_effect()
Setter name: set_effect(value)

forceLayoutInIE

Whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its background color (the latter is required in case the user has ClearType enabled). The default value is true. This is obviously ignored when working in other browsers.

Getter name: get_forceLayoutInIE()
Setter name: set_forceLayoutInIE(value)

maximumOpacity

Maximum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 1.

Getter name: get_maximumOpacity()
Setter name: set_maximumOpacity(value)

minimumOpacity

Minimum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 0.

Getter name: get_minimumOpacity()
Setter name: set_minimumOpacity(value)

Client methods

constructor(target, duration, fps, effect, minimumOpacity, maximumOpacity, forceLayoutInIE)

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.
  • effect

    • Type: Object
    • Description: determine whether to fade the element in or fade the element out. The possible values are FadeIn and FadeOut. The default value is FadeOut.
  • minimumOpacity

    • Type: Number
    • Description: Minimum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 0.
  • maximumOpacity

    • Type: Number
    • Description: Maximum opacity to use when fading in or out. Its value can range from between 0 to 1. The default value is 1.
  • forceLayoutInIE

    • Type: Boolean
    • Description: whether or not we should force a layout to be created for Internet Explorer by giving it a width and setting its background color (the latter is required in case the user has ClearType enabled). The default value is true. This is obviously ignored when working in other browsers.

getAnimatedValue(percentage)

Determine the current opacity after the given percentage of its duration has elapsed.

Params:

  • percentage
    • Type: Number
    • Description: Percentage of the animation already complete.

onStart()

The onStart method is called just before the animation is played each time.

setStartValue(value)

Set the start value (so that child animations can set the current opacity as the start value when fading in or out).

Params:

  • value
    • Type: Number
    • Description: Opacity to start fade animation with.

setValue(value)

Set the current opacity of the element.

Params:

  • value
    • Type: Number
    • Description: Current opacity (as retreived from getAnimatedValue).
Clone this wiki locally