fillMode

[ Function ]

public fillMode(valueNew: 'none' | 'forwards' | 'backwards' | 'both' | null): this;

Specifies whether the first keyframe should be effective before the start of the animation and/or the last keyframe after the end of the animation.

Parameter

Name

Type

Description

valueNew

string, null

The fill mode of the animation. If null is passed, the default value 'none' is used.

'none' means that the first keyframe is not effective until the delay has elapsed and the animation starts. At the end of the animation, the animated element returns to its original state.

'forwards' causes the last keyframe to continue working after the animation has expired.

'backwards' causes the first keyframe to take effect before the animation starts, while the delay elapses.

'both' combines 'forwards' and 'backwards'.

Return value

Type

Description

TcHmi.Animation

This method returns its parent object to allow concatenation of method calls.

Sample - JavaScript

var animation = new TcHmi.Animation('ViewDesktopBeckhoffLogo', '');
var fillModeDefault = animation.fillMode(); // 'none'
animation.fillMode('both');
var fillMode = animation.fillMode(); // 'both'
fillMode 1:

Available from 1.8