Projekte
Auf GitHub ansehen Electron-positioner
jenslind/electron-positioner
Über uns
:pushpin: Hilft dabei, Electron-Fenster zu positionieren.
Weitere ProjekteGemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalElectron-positioner

Helps positioning your electron windows.
Install
npm install --save electron-positioner
Usage
var Positioner = require('electron-positioner')
var positioner = new Positioner(browserWindow)
// Moves the window top right on the screen.
positioner.move('topRight')
// Returns `{x,y}`
positioner.calculate('trayCenter', trayBounds)
Note, trayBounds is only required with the positions that starts with tray.
Docs
new Positioner (browserWindow)
Constructor
BrowserWindow
The BrowserWindow instance.
calculate (position, trayBounds)
Returns coordinates {x,y}.
move (position, trayBounds)
Moves the window with BrowserWindow.setPosition()
position
A string telling where to place the window. Allowed values:
trayLefttrayBottomLefttrayRighttrayBottomRighttrayCentertrayBottomCentertopLefttopRightbottomLeftbottomRighttopCenterbottomCenterleftCenterrightCentercenter
trayBounds
Tray bounds, only needed for the following positions:
trayLefttrayBottomLefttrayRighttrayBottomRighttrayCentertrayBottomCenter
Tests
npm test
License
MIT
Ähnliche Projekte entdecken
Wird geladen…