Specify the parent element in JSFrame's initialization parameter.
The next step is to specify the parent element's style as "overflow:hidden" to prevent the window from overflowing from that elements.
Great! I was already going through a parentElement but not the style overflow: hidden.
My parent element does not use the entire window area, there is a sidebar menu with 225px. When maximizing, the window gains all the available width (window.innerWidth), exceeding 225px of the screen (horizontal scroll), so i made a change to the function renderMaximizedMode in WindowEventHelper.js:
if (me.hideFrameBorder) {
var parentElement = frame.jsFrame.windowManager.parentElement; //Not the best way!!
if (parentElement ) {
_toWidth = parentElement.offsetWidth;
_toHeight = parentElement.offsetHeight + (me.hideTitleBar? from.titleBarHeight: 0);
}
else {
_toWidth = window.innerWidth;
_toHeight = window.innerHeight + (me.hideTitleBar? from.titleBarHeight: 0);
}
} else {
...
}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi,
Is this what you want to do?
riversun.github.io/JSFrame.js/publ...
Specify the parent element in JSFrame's initialization parameter.
The next step is to specify the parent element's style as "overflow:hidden" to prevent the window from overflowing from that elements.
Then you might be able to do what you want to do.
Hi,
Great! I was already going through a parentElement but not the style overflow: hidden.
My parent element does not use the entire window area, there is a sidebar menu with 225px. When maximizing, the window gains all the available width (window.innerWidth), exceeding 225px of the screen (horizontal scroll), so i made a change to the function renderMaximizedMode in WindowEventHelper.js: