Path: blob/trunk/third_party/closure/goog/fx/transition.js
4533 views
/**1* @license2* Copyright The Closure Library Authors.3* SPDX-License-Identifier: Apache-2.04*/56/**7* @fileoverview An interface for transition animation. This is a simple8* interface that allows for playing and stopping a transition. It adds9* a simple event model with BEGIN and END event.10*/1112goog.provide('goog.fx.Transition');13goog.provide('goog.fx.Transition.EventType');14151617/**18* An interface for programmatic transition. Must extend19* `goog.events.EventTarget`.20* @interface21*/22goog.fx.Transition = function() {};232425/**26* Transition event types.27* @enum {string}28*/29goog.fx.Transition.EventType = {30/** Dispatched when played for the first time OR when it is resumed. */31PLAY: 'play',3233/** Dispatched only when the animation starts from the beginning. */34BEGIN: 'begin',3536/** Dispatched only when animation is restarted after a pause. */37RESUME: 'resume',3839/**40* Dispatched when animation comes to the end of its duration OR stop41* is called.42*/43END: 'end',4445/** Dispatched only when stop is called. */46STOP: 'stop',4748/** Dispatched only when animation comes to its end naturally. */49FINISH: 'finish',5051/** Dispatched when an animation is paused. */52PAUSE: 'pause'53};545556/**57* @type {function()}58* Plays the transition.59*/60goog.fx.Transition.prototype.play;616263/**64* @type {function()}65* Stops the transition.66*/67goog.fx.Transition.prototype.stop;686970