diff options
Diffstat (limited to 'lib/dojo/fx.js')
-rw-r--r-- | lib/dojo/fx.js | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/lib/dojo/fx.js b/lib/dojo/fx.js index 5c70d5b9e..60782accb 100644 --- a/lib/dojo/fx.js +++ b/lib/dojo/fx.js @@ -1,5 +1,5 @@ /* - Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ @@ -8,7 +8,9 @@ if(!dojo._hasResource["dojo.fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code. dojo._hasResource["dojo.fx"] = true; dojo.provide("dojo.fx"); -dojo.require("dojo.fx.Toggler"); // FIXME: remove this back-compat require in 2.0 +dojo.require("dojo.fx.Toggler"); + + /*===== dojo.fx = { // summary: Effects library on top of Base animations @@ -16,7 +18,7 @@ dojo.fx = { =====*/ (function(){ - var d = dojo, + var d = dojo, _baseObj = { _fire: function(evt, args){ if(this[evt]){ @@ -135,14 +137,14 @@ dojo.fx = { d.extend(_chain, _baseObj); dojo.fx.chain = function(/*dojo.Animation[]*/ animations){ - // summary: + // summary: // Chain a list of `dojo.Animation`s to run in sequence // // description: // Return a `dojo.Animation` which will play all passed // `dojo.Animation` instances in sequence, firing its own // synthesized events simulating a single animation. (eg: - // onEnd of this animation means the end of the chain, + // onEnd of this animation means the end of the chain, // not the individual animations within) // // example: @@ -170,7 +172,7 @@ dojo.fx = { this._pseudoAnimation = new d.Animation({curve: [0, 1], duration: this.duration}); var self = this; - d.forEach(["beforeBegin", "onBegin", "onPlay", "onAnimate", "onPause", "onStop", "onEnd"], + d.forEach(["beforeBegin", "onBegin", "onPlay", "onAnimate", "onPause", "onStop", "onEnd"], function(evt){ self._connects.push(d.connect(self._pseudoAnimation, evt, function(){ self._fire(evt, arguments); } @@ -228,11 +230,11 @@ dojo.fx = { d.extend(_combine, _baseObj); dojo.fx.combine = function(/*dojo.Animation[]*/ animations){ - // summary: + // summary: // Combine a list of `dojo.Animation`s to run in parallel // // description: - // Combine an array of `dojo.Animation`s to run in parallel, + // Combine an array of `dojo.Animation`s to run in parallel, // providing a new `dojo.Animation` instance encompasing each // animation, firing standard animation events. // @@ -303,17 +305,17 @@ dojo.fx = { } }, args)); - d.connect(anim, "onEnd", function(){ + d.connect(anim, "onEnd", function(){ s.height = "auto"; s.overflow = o; }); return anim; // dojo.Animation - } + }; dojo.fx.wipeOut = function(/*Object*/ args){ // summary: - // Shrink a node to nothing and hide it. + // Shrink a node to nothing and hide it. // // description: // Returns an animation that will shrink node defined in "args" @@ -322,7 +324,7 @@ dojo.fx = { // args: Object // A hash-map of standard `dojo.Animation` constructor properties // (such as easing: node: duration: and so on) - // + // // example: // | dojo.fx.wipeOut({ node:"someId" }).play() @@ -348,14 +350,14 @@ dojo.fx = { }); return anim; // dojo.Animation - } + }; dojo.fx.slideTo = function(/*Object*/ args){ // summary: // Slide a node to a new top/left position // // description: - // Returns an animation that will slide "node" + // Returns an animation that will slide "node" // defined in args Object from its current position to // the position defined by (args.left, args.top). // @@ -367,7 +369,7 @@ dojo.fx = { // example: // | dojo.fx.slideTo({ node: node, left:"40", top:"50", units:"px" }).play() - var node = args.node = d.byId(args.node), + var node = args.node = d.byId(args.node), top = null, left = null; var init = (function(n){ @@ -397,7 +399,7 @@ dojo.fx = { d.connect(anim, "beforeBegin", anim, init); return anim; // dojo.Animation - } + }; })(); |