Skip to content

waygraph / applyOrientation

Function: applyOrientation() ​

applyOrientation(state, orientation): DeviceState

Defined in: src/demo/narration/device.ts:56

Swap width/height so the viewport matches the requested orientation. Preserves deviceScaleFactor. No-op when already oriented.

Parameters ​

state ​

DeviceState

orientation ​

DeviceOrientation

Returns ​

DeviceState

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed