change viewPosition parameter in enableDeviceEmulation function does nothing

  • Electron version: 2.0.5
  • Operating system: Windows, Mac OS

Hi everyone,

How can I change the “viewPosition” when using enableDeviceEmulation?
I’m not sure to understand the meaning of “screenSize” parameter. It is not really clear for me.

Actual behavior

What’s I expect: window content position/size change.

Actual behavior

What’s I get: only window content size changes.

How to reproduce

My code:

  screenPosition: 'mobile',
  screenSize: { width: 2560, height: 1400 },
  viewPosition: { x: 50, y: 50 },
  viewSize: { width: 375, height: 812 }

I am not sure “viewPosition” parameter is taken into account.

My final purpose is to center my window content with a mobile size.