PDA

View Full Version : [FIXED-529][3.1] GridPanel calles view.layout twice.



vtswingkid
4 Feb 2010, 11:53 AM
view.layout is assigned to the event "bodyresize" in function "afterrender"

and

it is called in function "onResize"




afterRender : function(){

Ext.grid.GridPanel.superclass.afterRender.call(this);

var v = this.view;

this.on('bodyresize', v.layout, v);

v.layout();

if(this.deferRowRender){

v.afterRender.defer(10, this.view);

}else{

v.afterRender();

}

this.viewReady = true;
},


onResize : function(){

Ext.grid.GridPanel.superclass.onResize.apply(this, arguments);

if(this.viewReady){

this.view.layout();

}
},


I would remove the event.

Jamie Avins
4 Feb 2010, 12:19 PM
For 3.1.2 the onResize method for GridPanel will be removed and the bodyresize event will solely execute the view's layout method.

Jamie Avins
9 Feb 2010, 1:35 PM
Fixed in svn 3.1.x and 3.2.x branches.