ExtJS resize listener not invoked
The resize listener is not invoked for the first item. I'm confused by
that. The only difference between them is an "activate" listener.
When I click the first panel, nothing happens. clicking on the second
panel invokes resize. And clicking back the first panel, still nothing
happens.
{
xtype: 'tabpanel',
defaults: {
bodyPadding: 0,
listeners:{
}
},
layout: 'fit',
items:[
{
id: 'selector-usermap',
html: '<div id="selector-usermap-body">'
+ '</div>',
listeners: {
afterrender: function(){
renderSelectorUserMapView('selector-usermap-body',
300,300);
},
activate: function(tp, t){
console.log("active" + t.id);
brushUser(Ext.getCmp('preview-container').getUsers());
},
resize: function(panel){
var size = panel.body.getSize();
console.log("User Map resize()");
console.log(size);
resizeSelectorUserMapView(size.height, size.width);
}
}
},
{
title: 'Organization',
id: 'selector-organization',
html: '<div id="selector-organization-body">'
+ '</div>',
listeners: {
afterrender: function(){
Ext.getCmp('selector-usermap').doLayout();
renderSelectorOrgView(divId, divHeight, divWidth);
},
resize: function(panel){
var size = panel.body.getSize();
console.log("Org Hier resize");
console.log(size);
resizeSelectorOrgView(size.height, size.width);
},
}
}
]
}
No comments:
Post a Comment