I think what I found seems a PR4 bug but would like to confirm if it persist at your side too.
I created a panel under a view like this.
I remove all components and then add this to the view.Code:var video = Ext.create('Ext.Panel', {
id : 'jwPlayerContainer',
html : '<object type="application/x-shockwave-flash" id="jwplayer" name="jwplayer" data="jwplayer/player.swf" width="480" height="270" style="width: 1286px !important; height: 230px !important; "><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="flashvars" value="file=' + flashvars.file + '&streamer=' + flashvars.streamer + '"></object>'
});
My job is to resize the <object> based on its container so I use.Code:this.removeAll(true, true);
this.add(video);
My onResizeChange callback.Code:this.sizeMonitor = new Ext.util.SizeMonitor({
element : video.getEl(),
callback : this.onSizeChange,
scope : this
});
When user presses back button and comes again to that view the same panel with object element is added and new sizeMonitor is set. But this time the added panel and object element which was destroyed is returned and not the new one.Code:onSizeChange : function() {
var jwPlayer = Ext.get('jwplayer');
var jwPlayerContainer = Ext.get('jwPlayerContainer');
if(jwPlayer && jwPlayerContainer) {
console.log(jwPlayer.dom);
console.log(jwPlayerContainer.dom);
jwPlayer.setWidth(jwPlayerContainer.getWidth());
jwPlayer.setHeight(jwPlayerContainer.getHeight());
}
}
Is that a known bug?
