mmm
1 Oct 2008, 1:01 AM
Hi everybody!
I have some problems with modal mode using Window. When I put something like this:
Window window = new Window();
window.setModal(true);
window.show();somewhere in my application and try resizing browser window, size of the modal panel doesn't change so that some parts of application are uncovered by modal. I have debugged it and noticed that in onRender() method of ModalPanel is below code executing:
int width = body.dom.getScrollWidth();
int height = body.dom.getScrollHeight();
Size vp = XDOM.getViewportSize();
String w = "100%";
String h = "100%";
if (width > vp.width) { // == true
w = width + "px";
}
if (height > vp.height) { // == true
h = height + "px";
}
el().setSize(w, h);So modalPanel size is set to a fixed value. I think here is my problem. I don't really understand what for there are this two "if" statements which cause that modalPanel doesn't change its size during window resizing.
Can anybody help me?
I have some problems with modal mode using Window. When I put something like this:
Window window = new Window();
window.setModal(true);
window.show();somewhere in my application and try resizing browser window, size of the modal panel doesn't change so that some parts of application are uncovered by modal. I have debugged it and noticed that in onRender() method of ModalPanel is below code executing:
int width = body.dom.getScrollWidth();
int height = body.dom.getScrollHeight();
Size vp = XDOM.getViewportSize();
String w = "100%";
String h = "100%";
if (width > vp.width) { // == true
w = width + "px";
}
if (height > vp.height) { // == true
h = height + "px";
}
el().setSize(w, h);So modalPanel size is set to a fixed value. I think here is my problem. I don't really understand what for there are this two "if" statements which cause that modalPanel doesn't change its size during window resizing.
Can anybody help me?