Class: WindowPosition

WindowPosition(gets)

new WindowPosition(gets)

Initiates calculation, waits for electron app become ready before calculation.
Parameters:
Name Type Description
gets function calculated top left position as JSON {x: ?, y: ?}
Source:

Methods

getActiveScreenCenter(width, height) → {JSON}

Getter for browser window position so that the window opens centered on the screen where the mouse is.
Parameters:
Name Type Description
width number Width of the window which should be centered
height number Height of the window which should be centered
Source:
Throws:
fired if electron app module is not ready
Type
NotReadyException
Returns:
calculated centered position as JSON {x: ?, y: ?}
Type
JSON

getActiveScreenTopLeft() → {JSON}

Getter for browser window position so that the window opens at the top left corner, of the screen where the mouse is.
Source:
Throws:
fired if electron app module is not ready
Type
NotReadyException
Returns:
calculated top left position as JSON {x: ?, y: ?}
Type
JSON