I have a window which is not coming in center after browser resizing. When I resizing the browser half of the window getting disappear
var Win,
ViewPort = Ext.getBody(),
winWidth = ViewPort.getWidth(),
winHeight = ViewPort.getHeight();
Win = new Ext.IframeWindow({
id: 'H1',
modal: true,
resizable: true,
title: 'H1',
closable: true,
constrain : true,
});
Win.width = (winWidth / 100) * 90,
Win.height = (winHeight / 100) * 90,
Also when I am giving width and height by some percentage like
Win.width = '80%',
Win.height = '90%',
In this case is coming fine. But I don't want because of data and layout adjusment on window.
In this case you need to get new viewport(as per your code) of resized browser and then you have to set new width and height for win.
Here is the method you can use