Window Size for Alarm Frames / Zone Editing with hires Cams

Forum for questions and support relating to the 1.26.x releases only.
Locked
mabene
Posts: 13
Joined: Tue Dec 24, 2013 1:06 pm

Window Size for Alarm Frames / Zone Editing with hires Cams

Post by mabene »

I'm having an issue with window size when using 1080p cameras running browser on windows: for editing zones or showing alarm frames, zm tries to open popup windows bigger than actual screen size.
This results in popups extending "under" the windows task bar and making controls (like links to next/previous alarm frame or save button on zone settings) unavailable even when scrolling all the way down.
I have to resize the window to get at those controls.

As a workaround I added some code to skin.js that resizes the popups to available screen width and height - I just wonder if that's the right way to handle the issue or if this should be placed somewhere else.

Code: Select all

function checkSize() {
    if (window.outerHeight) {
        var w = window.outerWidth;
        var prevW = w;
        var h = window.outerHeight;
        var prevH = h;
        if (h > screen.availHeight)
            h  = screen.availHeight;
        if (w > screen.availWidth)
            w  = screen.availWidth;
        if (w != prevW || h != prevH)
            window.resizeTo(w,h);
    }
}

window.addEvent( 'domready', checkSize);
worksForMe on chrome and IE, both current versions.
Locked