flymis/WebRoot/dojojs/src/animation/AnimationSequence.js

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

dojo.provide("dojo.animation.AnimationSequence");
dojo.require("dojo.animation.AnimationEvent");
dojo.require("dojo.animation.Animation");

dojo.deprecated("dojo.animation.AnimationSequence is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5");

dojo.animation.AnimationSequence = function(/*int?*/ repeatCount){
	// summary: Sequence of Animations, played one after the other.
	// repeatCount: Number of times to repeat the entire sequence.  Default is 0 (play once only).
	// description: Calls the following events: "onBegin", "onEnd", "onNext"
	// 				If the animation implements a "handler" function, that will be called before each event is called.
	this._anims = [];
	this.repeatCount = repeatCount || 0;
}

dojo.lang.extend(dojo.animation.AnimationSequence, {
	repeatCount: 0,

	_anims: [],
	_currAnim: -1,

	onBegin: null,
	onEnd: null,
	onNext: null,
	handler: null,

	add: function() {
		// summary: Add one or more Animations to the sequence.
		// description:  args: Animations (dojo.animation.Animation) to add to the sequence.
		for(var i = 0; i < arguments.length; i++) {
			this._anims.push(arguments[i]);
			arguments[i]._animSequence = this;
		}
	},

	remove: function(/*dojo.animation.Animation*/ anim) {
		// summary: Remove one particular animation from the sequence.
		//	amim: Animation to remove.
		for(var i = 0; i < this._anims.length; i++) {
			if( this._anims[i] == anim ) {
				this._anims[i]._animSequence = null;
				this._anims.splice(i, 1);
				break;
			}
		}
	},

	removeAll: function() {
		// summary: Remove all animations from the sequence.
		for(var i = 0; i < this._anims.length; i++) {
后面还有 102 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。