Ticket #5689: expandoPane_20080219.patch
| File expandoPane_20080219.patch, 1.5 kB (added by sfoster, 6 months ago) |
|---|
-
layout/ExpandoPane.js
31 31 // duration: Integer 32 32 // duration to run show/hide animations 33 33 duration:420, 34 34 35 35 postCreate:function(){ 36 36 37 37 this.inherited(arguments); 38 38 this._animConnects = []; 39 40 this._isHorizontal = true; 41 39 42 this._container = this.getParent(); 40 43 this._titleHeight = dojo._getBorderBox(this.titleWrapper).h + 2; 41 44 … … 55 58 dojo.addClass(this.titleWrapper,"iconRight"); 56 59 break; 57 60 } 61 this.isHorizontal = !/top|bottom/.test(region); 58 62 } 59 63 this._setupAnims(); 60 64 }, … … 66 70 node:this.domNode, 67 71 duration:this.duration 68 72 }; 73 74 var isHorizontal = this._isHorizontal; 75 var showProps = {}, hideProps = {}, dimension = isHorizontal ? "width" : "height"; 76 77 showProps[dimension] = { 78 end:this[( isHorizontal ? "maxWidth" : "maxHeight")] || 275, 79 unit:"px" 80 }; 81 hideProps[dimension] = { 82 end: (this._titleHeight - 6), 83 unit:"px" 84 }; 85 69 86 this._showAnim = dojo.animateProperty(dojo.mixin(_common,{ 70 87 easing:this.easeIn, 71 properties: { 72 width:{ end:this.maxWidth||275, unit:"px" } 73 } 88 properties: showProps 74 89 })); 75 90 this._hideAnim = dojo.animateProperty(dojo.mixin(_common,{ 76 91 easing:this.easeOut, 77 properties: { 78 width:{ 79 end: (this._titleHeight - 6), unit:"px" 80 } 81 } 92 properties: hideProps 82 93 })); 83 94 84 95 this._animConnects = [