PDA

View Full Version : region re rendering on expand in different browsers



alupuli
14 Jun 2011, 10:31 PM
Keeping an object tag in center region.
Region in re rendered on every expand.
For eg. Youtube video played is not retaining it position after collapse and expand.

All non IE browsers are re rendering the html on expand.
Is there any config to avoid this.



Ext.onReady(function () {
new Ext.Viewport({
layout: 'border',
items: [{
height: 75,
region: 'north',
title: 'North'
}, {
width: 150,
region: 'west',
title: 'west'
}, {
region: 'center',
title: 'center',
collapsible: true,
html: '<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/Eznls7RfosI"></param><embed src="http://www.youtube.com/v/Eznls7RfosI" type="application/x-shockwave-flash" width="425" height="350"></embed></object>'
}, {
region: 'south',
title: 'center'
}]
});
});

skirtle
16 Jun 2011, 1:53 PM
Different things work in different browsers. For the browsers I tested against this extra bit of panel config seemed to fix it:


animCollapse: false,
hideMode: 'visibility'

Of course this will also lose you the animation effect when the panel collapses but unfortunately that slide effect sets display: none when it finishes animating, which is one of the causes of the video resetting.