document missing method parameters
This commit is contained in:
parent
97a004a357
commit
28d42ba35b
7 changed files with 64 additions and 31 deletions
|
@ -974,32 +974,31 @@ app.on('ready', () => {
|
|||
|
||||
#### `contents.enableDeviceEmulation(parameters)`
|
||||
|
||||
`parameters` Object, properties:
|
||||
|
||||
* `screenPosition` String - Specify the screen type to emulate
|
||||
(default: `desktop`)
|
||||
* `desktop` - Desktop screen type
|
||||
* `mobile` - Mobile screen type
|
||||
* `screenSize` Object - Set the emulated screen size (screenPosition == mobile)
|
||||
* `width` Integer - Set the emulated screen width
|
||||
* `height` Integer - Set the emulated screen height
|
||||
* `viewPosition` Object - Position the view on the screen
|
||||
(screenPosition == mobile) (default: `{x: 0, y: 0}`)
|
||||
* `x` Integer - Set the x axis offset from top left corner
|
||||
* `y` Integer - Set the y axis offset from top left corner
|
||||
* `deviceScaleFactor` Float - Set the device scale factor (if zero defaults to
|
||||
original device scale factor) (default: `0`)
|
||||
* `viewSize` Object - Set the emulated view size (empty means no override)
|
||||
* `width` Integer - Set the emulated view width
|
||||
* `height` Integer - Set the emulated view height
|
||||
* `fitToView` Boolean - Whether emulated view should be scaled down if
|
||||
necessary to fit into available space (default: `false`)
|
||||
* `offset` Object - Offset of the emulated view inside available space (not in
|
||||
fit to view mode) (default: `{x: 0, y: 0}`)
|
||||
* `x` Float - Set the x axis offset from top left corner
|
||||
* `y` Float - Set the y axis offset from top left corner
|
||||
* `scale` Float - Scale of emulated view inside available space (not in fit to
|
||||
view mode) (default: `1`)
|
||||
* `parameters` Object
|
||||
* `screenPosition` String - Specify the screen type to emulate
|
||||
(default: `desktop`)
|
||||
* `desktop` String - Desktop screen type
|
||||
* `mobile` String - Mobile screen type
|
||||
* `screenSize` Object - Set the emulated screen size (screenPosition == mobile)
|
||||
* `width` Integer - Set the emulated screen width
|
||||
* `height` Integer - Set the emulated screen height
|
||||
* `viewPosition` Object - Position the view on the screen
|
||||
(screenPosition == mobile) (default: `{x: 0, y: 0}`)
|
||||
* `x` Integer - Set the x axis offset from top left corner
|
||||
* `y` Integer - Set the y axis offset from top left corner
|
||||
* `deviceScaleFactor` Integer - Set the device scale factor (if zero defaults to
|
||||
original device scale factor) (default: `0`)
|
||||
* `viewSize` Object - Set the emulated view size (empty means no override)
|
||||
* `width` Integer - Set the emulated view width
|
||||
* `height` Integer - Set the emulated view height
|
||||
* `fitToView` Boolean - Whether emulated view should be scaled down if
|
||||
necessary to fit into available space (default: `false`)
|
||||
* `offset` Object - Offset of the emulated view inside available space (not in
|
||||
fit to view mode) (default: `{x: 0, y: 0}`)
|
||||
* `x` Float - Set the x axis offset from top left corner
|
||||
* `y` Float - Set the y axis offset from top left corner
|
||||
* `scale` Float - Scale of emulated view inside available space (not in fit to
|
||||
view mode) (default: `1`)
|
||||
|
||||
Enable device emulation with the given parameters.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue