Changeset 13740
- Timestamp:
- 05/15/08 10:43:28 (2 months ago)
- Files:
-
- 1 modified
-
dijit/trunk/layout/ContentPane.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/layout/ContentPane.js
r13521 r13740 193 193 if(this._singleChild && this._singleChild.resize){ 194 194 this._singleChild.startup(); 195 this._singleChild.resize(this._contentBox || dojo.contentBox(this.containerNode)); 195 var cb = this._contentBox || dojo.contentBox(this.containerNode); 196 this._singleChild.resize({w: cb.w, h: cb.h}); 196 197 } 197 198 } … … 230 231 mb = dojo.mixin(dojo.marginBox(node), size||{}); 231 232 232 this._contentBox = dijit.layout.marginBox2contentBox(node, mb);233 var cb = this._contentBox = dijit.layout.marginBox2contentBox(node, mb); 233 234 234 235 // If we have a single widget child then size it to fit snugly within my borders 235 236 if(this._singleChild && this._singleChild.resize){ 236 this._singleChild.resize(this._contentBox); 237 // note: if widget has padding this._contentBox will have l and t set, 238 // but don't pass them to resize() or it will doubly-offset the child 239 this._singleChild.resize({w: cb.w, h: cb.h}); 237 240 } 238 241 },