meroy
17 Jan 2010, 6:49 PM
Here's a small patch set to address issues with toolbar overflow and the accordion demo in layout-browser. Also, the doLayout in Container is using deferLayout and not deferResize.
For the last diff below, layoutTargetSize is not set correctly as it breaks the accordion demo. Also the diff for Panel.js is needed for the accordion demo issue.
diff -r svn.ext-5899/src/widgets/Container.js svn.ext-5899-a1/src/widgets/Container.js
903c903
< this.deferResize = true;
---
> this.deferLayout = true;
915c915
< this.deferResize = true;
---
> this.deferLayout = true;
931,932c931,932
< if(Ext.isDefined(this.deferResize)){
< delete this.deferResize;
---
> if(Ext.isDefined(this.deferLayout)){
> delete this.deferLayout;
diff -r svn.ext-5899/src/widgets/Panel.js svn.ext-5899-a1/src/widgets/Panel.js
1403,1404c1403,1404
< if (this.deferResize) {
< delete this.deferResize;
---
> if (this.deferLayout) {
> delete this.deferLayout;
1489c1489,1497
< this.deferResize = true;
---
> this.queuedBodySize = {width: w, height: h};
> if(!this.queuedExpand && this.allowQueuedExpand !== false){
> this.queuedExpand = true;
> this.on('expand', function(){
> delete this.queuedExpand;
> this.onResize(this.queuedBodySize.width, this.queuedBodySize.height);
> }, this, {single:true});
> }
> this.deferLayout = true;
diff -r svn.ext-5899/src/widgets/Toolbar.js svn.ext-5899-a1/src/widgets/Toolbar.js
6a7
> monitorResize : true,
diff -r svn.ext-5899/src/widgets/layout/FitLayout.js svn.ext-5899-a1/src/widgets/layout/FitLayout.js
37c37,38
< this.setItemSize(this.activeItem || ct.items.itemAt(0), this.layoutTargetSize);
---
> // this.setItemSize(this.activeItem || ct.items.itemAt(0), this.layoutTargetSize);
> this.setItemSize(this.activeItem || ct.items.itemAt(0), target.getViewSize(true));
For the last diff below, layoutTargetSize is not set correctly as it breaks the accordion demo. Also the diff for Panel.js is needed for the accordion demo issue.
diff -r svn.ext-5899/src/widgets/Container.js svn.ext-5899-a1/src/widgets/Container.js
903c903
< this.deferResize = true;
---
> this.deferLayout = true;
915c915
< this.deferResize = true;
---
> this.deferLayout = true;
931,932c931,932
< if(Ext.isDefined(this.deferResize)){
< delete this.deferResize;
---
> if(Ext.isDefined(this.deferLayout)){
> delete this.deferLayout;
diff -r svn.ext-5899/src/widgets/Panel.js svn.ext-5899-a1/src/widgets/Panel.js
1403,1404c1403,1404
< if (this.deferResize) {
< delete this.deferResize;
---
> if (this.deferLayout) {
> delete this.deferLayout;
1489c1489,1497
< this.deferResize = true;
---
> this.queuedBodySize = {width: w, height: h};
> if(!this.queuedExpand && this.allowQueuedExpand !== false){
> this.queuedExpand = true;
> this.on('expand', function(){
> delete this.queuedExpand;
> this.onResize(this.queuedBodySize.width, this.queuedBodySize.height);
> }, this, {single:true});
> }
> this.deferLayout = true;
diff -r svn.ext-5899/src/widgets/Toolbar.js svn.ext-5899-a1/src/widgets/Toolbar.js
6a7
> monitorResize : true,
diff -r svn.ext-5899/src/widgets/layout/FitLayout.js svn.ext-5899-a1/src/widgets/layout/FitLayout.js
37c37,38
< this.setItemSize(this.activeItem || ct.items.itemAt(0), this.layoutTargetSize);
---
> // this.setItemSize(this.activeItem || ct.items.itemAt(0), this.layoutTargetSize);
> this.setItemSize(this.activeItem || ct.items.itemAt(0), target.getViewSize(true));