LearnNewsExamplesServices
Frontmatter
id718
titleNeo.Main.getWindowData()
stateClosed
labels
enhancement
assigneestobiu
createdAtJun 14, 2020, 2:38 PM
updatedAtJun 14, 2020, 3:32 PM
githubUrlhttps://github.com/neomjs/neo/issues/718
authortobiu
commentsCount2
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 14, 2020, 3:32 PM

Neo.Main.getWindowData()

tobiu
tobiu commented on Jun 14, 2020, 2:38 PM

for displaying popup windows, we need access to window.screenLeft & top.

remoteAccess

tobiu added the enhancement label on Jun 14, 2020, 2:38 PM
tobiu assigned to @tobiu on Jun 14, 2020, 2:38 PM
tobiu changed title from Neo.Main.getWindowPosition() to Neo.Main.getWindowScreen() on Jun 14, 2020, 2:53 PM
tobiu
tobiu Jun 14, 2020, 2:53 PM

window.screen is not spreadable.

tobiu referenced in commit f6ac0a9 - "Neo.Main.getWindowScreen() #718" on Jun 14, 2020, 2:54 PM
tobiu closed this issue on Jun 14, 2020, 2:54 PM
tobiu reopened this issue on Jun 14, 2020, 3:32 PM
tobiu changed title from Neo.Main.getWindowScreen() to Neo.Main.getWindowData() on Jun 14, 2020, 3:32 PM
tobiu
tobiu Jun 14, 2020, 3:32 PM

adjusted to:

    getWindowData() {
        const win    = window,
              screen = win.screen;

    return {
        innerHeight: win.innerHeight,
        innerWidth : win.innerWidth,
        outerHeight: win.outerHeight,
        outerWidth : win.outerWidth,
        screen: {
            availHeight: screen.availHeight,
            availLeft  : screen.availLeft,
            availTop   : screen.availTop,
            availWidth : screen.availWidth,
            colorDepth : screen.colorDepth,
            height     : screen.height,
            orientation: {angle: screen.orientation.angle, type: screen.orientation.type},
            pixelDepth : screen.pixelDepth,
            width      : screen.width
        },
        screenLeft: win.screenLeft,
        screenTop : win.screenTop,
    };
}

tobiu closed this issue on Jun 14, 2020, 3:32 PM