プロジェクトElectron-positioner
概要
:pushpin: Electronウィンドウの配置を支援します。
その他のプロジェクト計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルElectron-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
関連プロジェクトを探す
読み込み中…