summaryrefslogtreecommitdiff
path: root/lib/dojo/fx/Toggler.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dojo/fx/Toggler.js')
-rw-r--r--lib/dojo/fx/Toggler.js104
1 files changed, 2 insertions, 102 deletions
diff --git a/lib/dojo/fx/Toggler.js b/lib/dojo/fx/Toggler.js
index dc4693d8e..265586c37 100644
--- a/lib/dojo/fx/Toggler.js
+++ b/lib/dojo/fx/Toggler.js
@@ -4,105 +4,5 @@
see: http://dojotoolkit.org/license for details
*/
-
-if(!dojo._hasResource["dojo.fx.Toggler"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo.fx.Toggler"] = true;
-dojo.provide("dojo.fx.Toggler");
-
-
-dojo.declare("dojo.fx.Toggler", null, {
- // summary:
- // A simple `dojo.Animation` toggler API.
- //
- // description:
- // class constructor for an animation toggler. It accepts a packed
- // set of arguments about what type of animation to use in each
- // direction, duration, etc. All available members are mixed into
- // these animations from the constructor (for example, `node`,
- // `showDuration`, `hideDuration`).
- //
- // example:
- // | var t = new dojo.fx.Toggler({
- // | node: "nodeId",
- // | showDuration: 500,
- // | // hideDuration will default to "200"
- // | showFunc: dojo.fx.wipeIn,
- // | // hideFunc will default to "fadeOut"
- // | });
- // | t.show(100); // delay showing for 100ms
- // | // ...time passes...
- // | t.hide();
-
- // node: DomNode
- // the node to target for the showing and hiding animations
- node: null,
-
- // showFunc: Function
- // The function that returns the `dojo.Animation` to show the node
- showFunc: dojo.fadeIn,
-
- // hideFunc: Function
- // The function that returns the `dojo.Animation` to hide the node
- hideFunc: dojo.fadeOut,
-
- // showDuration:
- // Time in milliseconds to run the show Animation
- showDuration: 200,
-
- // hideDuration:
- // Time in milliseconds to run the hide Animation
- hideDuration: 200,
-
- // FIXME: need a policy for where the toggler should "be" the next
- // time show/hide are called if we're stopped somewhere in the
- // middle.
- // FIXME: also would be nice to specify individual showArgs/hideArgs mixed into
- // each animation individually.
- // FIXME: also would be nice to have events from the animations exposed/bridged
-
- /*=====
- _showArgs: null,
- _showAnim: null,
-
- _hideArgs: null,
- _hideAnim: null,
-
- _isShowing: false,
- _isHiding: false,
- =====*/
-
- constructor: function(args){
- var _t = this;
-
- dojo.mixin(_t, args);
- _t.node = args.node;
- _t._showArgs = dojo.mixin({}, args);
- _t._showArgs.node = _t.node;
- _t._showArgs.duration = _t.showDuration;
- _t.showAnim = _t.showFunc(_t._showArgs);
-
- _t._hideArgs = dojo.mixin({}, args);
- _t._hideArgs.node = _t.node;
- _t._hideArgs.duration = _t.hideDuration;
- _t.hideAnim = _t.hideFunc(_t._hideArgs);
-
- dojo.connect(_t.showAnim, "beforeBegin", dojo.hitch(_t.hideAnim, "stop", true));
- dojo.connect(_t.hideAnim, "beforeBegin", dojo.hitch(_t.showAnim, "stop", true));
- },
-
- show: function(delay){
- // summary: Toggle the node to showing
- // delay: Integer?
- // Ammount of time to stall playing the show animation
- return this.showAnim.play(delay || 0);
- },
-
- hide: function(delay){
- // summary: Toggle the node to hidden
- // delay: Integer?
- // Ammount of time to stall playing the hide animation
- return this.hideAnim.play(delay || 0);
- }
-});
-
-}
+//>>built
+define("dojo/fx/Toggler",["../_base/lang","../_base/declare","../_base/fx","../_base/connect"],function(_1,_2,_3,_4){return _2("dojo.fx.Toggler",null,{node:null,showFunc:_3.fadeIn,hideFunc:_3.fadeOut,showDuration:200,hideDuration:200,constructor:function(_5){var _6=this;_1.mixin(_6,_5);_6.node=_5.node;_6._showArgs=_1.mixin({},_5);_6._showArgs.node=_6.node;_6._showArgs.duration=_6.showDuration;_6.showAnim=_6.showFunc(_6._showArgs);_6._hideArgs=_1.mixin({},_5);_6._hideArgs.node=_6.node;_6._hideArgs.duration=_6.hideDuration;_6.hideAnim=_6.hideFunc(_6._hideArgs);_4.connect(_6.showAnim,"beforeBegin",_1.hitch(_6.hideAnim,"stop",true));_4.connect(_6.hideAnim,"beforeBegin",_1.hitch(_6.showAnim,"stop",true));},show:function(_7){return this.showAnim.play(_7||0);},hide:function(_8){return this.hideAnim.play(_8||0);}});}); \ No newline at end of file