Changeset 9999
- Timestamp:
- 08/07/07 05:55:01 (16 months ago)
- Files:
-
- 4 modified
-
dijit/trunk/TitlePane.js (modified) (7 diffs)
-
dijit/trunk/Tree.js (modified) (12 diffs)
-
dojo/trunk/fx.js (modified) (4 diffs)
-
dojox/trunk/fx/_base.js (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/TitlePane.js
r9893 r9999 40 40 // setup open/close animations 41 41 var hideNode = this.hideNode, wipeNode = this.wipeNode; 42 this._ slideIn = dojo.fx.slideIn({42 this._wipeIn = dojo.fx.wipeIn({ 43 43 node: this.wipeNode, 44 44 duration: this.duration, … … 47 47 } 48 48 }); 49 this._ slideOut = dojo.fx.slideOut({49 this._wipeOut = dojo.fx.wipeOut({ 50 50 node: this.wipeNode, 51 51 duration: this.duration, … … 59 59 // summary 60 60 // Typically called when an href is loaded. Our job is to make the animation smooth 61 if(this._ slideOut.status() == "playing"){61 if(this._wipeOut.status() == "playing"){ 62 62 // we are currently *closing* the pane, so just let that continue 63 63 dijit.layout.ContentPane.prototype.setContent.apply(this, content); 64 64 }else{ 65 if(this._ slideIn.status() == "playing"){66 this._ slideIn.stop();65 if(this._wipeIn.status() == "playing"){ 66 this._wipeIn.stop(); 67 67 } 68 68 … … 73 73 dijit.layout.ContentPane.prototype.setContent.apply(this, arguments); 74 74 75 // call _ slideIn.play() to animate from current height to new height76 this._ slideIn.play();75 // call _wipeIn.play() to animate from current height to new height 76 this._wipeIn.play(); 77 77 } 78 78 }, … … 80 80 toggle: function(){ 81 81 // summary: switches between opened and closed state 82 dojo.forEach([this._ slideIn, this._slideOut], function(animation){82 dojo.forEach([this._wipeIn, this._wipeOut], function(animation){ 83 83 if(animation.status() == "playing"){ 84 84 animation.stop(); … … 86 86 }); 87 87 88 this[this.open ? "_ slideOut" : "_slideIn"].play();89 this.open =!this.open;88 this[this.open ? "_wipeOut" : "_wipeIn"].play(); 89 this.open =! this.open; 90 90 91 91 // load content (if this is the first time we are opening the TitlePane … … 111 111 this._onTitleClick(); 112 112 } 113 else if (e.keyCode == dojo.keys.DOWN_ARROW){113 else if(e.keyCode == dojo.keys.DOWN_ARROW){ 114 114 if(this.open){ 115 115 this.containerNode.focus(); -
dijit/trunk/Tree.js
r9996 r9999 24 24 lock: function(){ 25 25 // summary: lock this node (and it's descendants) while a delete is taking place? 26 this.locked =true;26 this.locked = true; 27 27 }, 28 28 unlock: function(){ … … 31 31 throw new Error(this.declaredClass+" unlock: not locked"); 32 32 } 33 this.locked =false;33 this.locked = false; 34 34 }, 35 35 … … 92 92 } 93 93 94 if (this.isTree){94 if(this.isTree){ 95 95 // put first child in tab index if one exists. 96 96 var fc = this.getChildren()[0]; 97 var tabnode = (fc)? fc.labelNode : this.domNode;97 var tabnode = fc ? fc.labelNode : this.domNode; 98 98 tabnode.setAttribute("tabIndex", "0"); 99 99 } … … 164 164 var div = document.createElement('div'); 165 165 div.style.display = 'none'; 166 div.className ="dijitTreeContainer";166 div.className = "dijitTreeContainer"; 167 167 dijit.wai.setAttr(div, "waiRole", "role", "presentation"); 168 168 this.containerNodeTemplate = div; … … 190 190 191 191 toString: function(){ 192 return "["+this.declaredClass+" ID:"+this.id +"]"192 return "["+this.declaredClass+" ID:"+this.id+"]"; 193 193 }, 194 194 … … 197 197 do{ 198 198 ret=dijit.byNode(domElement); 199 }while(!ret && (domElement =domElement.parentNode));199 }while(!ret && (domElement = domElement.parentNode)); 200 200 return ret; 201 201 }, … … 330 330 postCreate: function(){ 331 331 // set label, escaping special characters 332 this.labelNode.innerHTML ="";332 this.labelNode.innerHTML = ""; 333 333 this.labelNode.appendChild(document.createTextNode(this.label)); 334 334 … … 387 387 388 388 // create animations for showing/hiding the children 389 this._ slideIn = dojo.fx.slideIn({node: this.containerNode, duration: 250});390 dojo.connect(this. slideIn, "onEnd", dojo.hitch(this, "_afterExpand"));391 this._ slideOut = dojo.fx.slideOut({node: this.containerNode, duration: 250});392 dojo.connect(this. slideOut, "onEnd", dojo.hitch(this, "_afterCollapse"));389 this._wipeIn = dojo.fx.wipeIn({node: this.containerNode, duration: 250}); 390 dojo.connect(this.wipeIn, "onEnd", dojo.hitch(this, "_afterExpand")); 391 this._wipeOut = dojo.fx.wipeOut({node: this.containerNode, duration: 250}); 392 dojo.connect(this.wipeOut, "onEnd", dojo.hitch(this, "_afterCollapse")); 393 393 }, 394 394 … … 398 398 399 399 // cancel in progress collapse operation 400 if(this._ slideOut.status() == "playing"){401 this._ slideOut.stop();400 if(this._wipeOut.status() == "playing"){ 401 this._wipeOut.stop(); 402 402 } 403 403 … … 409 409 410 410 // TODO: use animation that's constant speed of movement, not constant time regardless of height 411 this._ slideIn.play();411 this._wipeIn.play(); 412 412 }, 413 413 … … 421 421 422 422 // cancel in progress expand operation 423 if(this._ slideIn.status() == "playing"){424 this._ slideIn.stop();423 if(this._wipeIn.status() == "playing"){ 424 this._wipeIn.stop(); 425 425 } 426 426 … … 429 429 this._setExpando(); 430 430 431 this._ slideOut.play();431 this._wipeOut.play(); 432 432 }, 433 433 -
dojo/trunk/fx.js
r9915 r9999 45 45 // showDuration: 500, 46 46 // // hideDuration will default to "200" 47 // showFunc: dojo. slideIn,47 // showFunc: dojo.wipeIn, 48 48 // // hideFunc will default to "fadeOut" 49 49 // }); … … 59 59 60 60 dojo.mixin(_t, args); 61 _t.node = args ["node"];61 _t.node = args.node; 62 62 _t._showArgs = dojo.mixin({}, args); 63 63 _t._showArgs.node = _t.node; … … 102 102 ); 103 103 104 dojo.fx. slideIn = function(/*Object*/ args){104 dojo.fx.wipeIn = function(/*Object*/ args){ 105 105 // summary 106 106 // Returns an animation that will expand the … … 143 143 } 144 144 145 dojo.fx. slideOut = function(/*Object*/ args){145 dojo.fx.wipeOut = function(/*Object*/ args){ 146 146 // summary 147 147 // Returns an animation that will shrink node defined in "args" 148 148 // from it's current height to 1px, and then hide it. 149 var node = args.node = dojo.byId(args.node);149 var node = (args.node = dojo.byId(args.node)); 150 150 151 151 var anim = dojo.animateProperty(dojo.mixin({ -
dojox/trunk/fx/_base.js
r9944 r9999 9 9 dojox.fx.chain = dojo.fx.chain; 10 10 dojox.fx.combine = dojo.fx.combine; 11 dojox.fx. slideIn = dojo.fx.slideIn;12 dojox.fx. slideOut = dojo.fx.slideOut;11 dojox.fx.wipeIn = dojo.fx.wipeIn; 12 dojox.fx.wipeOut = dojo.fx.wipeOut; 13 13 dojox.fx.slideTo = dojo.fx.slideTo; 14 14 … … 35 35 // 36 36 // 37 var node = args.node = dojo.byId(args.node);37 var node = (args.node = dojo.byId(args.node)); 38 38 var compute = dojo.getComputedStyle; 39 39 … … 81 81 82 82 // FIXME: 83 // dojo.fx[args.method]([anim1,anim2]); 84 if(args.method == "combine"){ 85 var anim = dojo.fx.combine([anim1,anim2]); 86 }else{ 87 var anim = dojo.fx.chain([anim1,anim2]); 88 } 83 // dojo.fx[args.method]([anim1,anim2]); 84 var anim = dojo.fx[((args.method == "combine") ? "combine" : "chain")]([anim1,anim2]); 89 85 dojo.connect(anim, "beforeBegin", anim, init); 90 86 return anim; // dojo._Animation … … 107 103 // args.cssClass: String - class string (to be added onEnd) 108 104 // 109 var node = args.node = dojo.byId(args.node);105 var node = (args.node = dojo.byId(args.node)); 110 106 111 107 var pushClass = (function(){ … … 148 144 // args.cssClass: String - class string (to be removed from node) 149 145 // 150 var node = args.node = dojo.byId(args.node);146 var node = (args.node = dojo.byId(args.node)); 151 147 152 148 var pullClass = (function(){ … … 241 237 // false to calculate what removing the class would do 242 238 243 var node = args.node = dojo.byId(args.node);239 var node = (args.node = dojo.byId(args.node)); 244 240 var compute = dojo.getComputedStyle(node); 245 241