]>
Commit | Line | Data |
---|---|---|
2f01fe57 AD |
1 | /* |
2 | Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. | |
3 | Available via Academic Free License >= 2.1 OR the modified BSD license. | |
4 | see: http://dojotoolkit.org/license for details | |
5 | */ | |
6 | ||
7 | ||
8 | if(!dojo._hasResource["dojo.fx.Toggler"]){ | |
9 | dojo._hasResource["dojo.fx.Toggler"]=true; | |
10 | dojo.provide("dojo.fx.Toggler"); | |
11 | dojo.declare("dojo.fx.Toggler",null,{node:null,showFunc:dojo.fadeIn,hideFunc:dojo.fadeOut,showDuration:200,hideDuration:200,constructor:function(_1){ | |
12 | var _2=this; | |
13 | dojo.mixin(_2,_1); | |
14 | _2.node=_1.node; | |
15 | _2._showArgs=dojo.mixin({},_1); | |
16 | _2._showArgs.node=_2.node; | |
17 | _2._showArgs.duration=_2.showDuration; | |
18 | _2.showAnim=_2.showFunc(_2._showArgs); | |
19 | _2._hideArgs=dojo.mixin({},_1); | |
20 | _2._hideArgs.node=_2.node; | |
21 | _2._hideArgs.duration=_2.hideDuration; | |
22 | _2.hideAnim=_2.hideFunc(_2._hideArgs); | |
23 | dojo.connect(_2.showAnim,"beforeBegin",dojo.hitch(_2.hideAnim,"stop",true)); | |
24 | dojo.connect(_2.hideAnim,"beforeBegin",dojo.hitch(_2.showAnim,"stop",true)); | |
25 | },show:function(_3){ | |
26 | return this.showAnim.play(_3||0); | |
27 | },hide:function(_4){ | |
28 | return this.hideAnim.play(_4||0); | |
29 | }}); | |
30 | } |