unregisterEventHandler
[ Function ]
public unregisterEventHandler(
name: 'animationstart' | 'animationend' | 'animationiteration',
callback: (event: TcHmi.Animation.AnimationEvent) => void
): this;
Unregister a callback for an animation event.
Parameter
Name | Type | Description |
---|---|---|
name | The name of the previously registered event.
| |
callback | (event: TcHmi.Animation.AnimationEvent) => void | The previously registered function. Must be the same reference as the callback parameter previously passed to registerEventHandler. |
Return value
Type | Description |
---|---|
This method returns its parent object to allow concatenation of method calls. |
Sample - JavaScript
var animation = new TcHmi.Animation('ViewDesktopBeckhoffLogo', '');
var eventHandler = function (event) {
console.log('Animation started: ' + event.animationName);
};
animation.registerEventHandler('animationstart', eventHandler);
var handlers = animation.eventHandlers(); // [{ name: 'animationstart', callback: f(event) }]
animation.unregisterEventHandler('animationstart', eventHandler);
handlers = animation.eventHandlers(); // []
Available from 1.8 |