loading...

re: Introduction of Floating Window Library “JSFrame.js” VIEW POST

FULL DISCUSSION
 

Hi,

It's possible that the windows occupy only a certain area and not all body?

For example, I have an admin template with side menu and I want the windows to occupy only the right area of the system.

 

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:

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 {
    ...
}
code of conduct - report abuse