()
| 121 | } |
| 122 | |
| 123 | function getTouchScreen(): TouchScreen { |
| 124 | // Normalize the screen by any scaling to get the layout coordinate space. |
| 125 | let screenWidth = Number(window.visualViewport?.width ?? window.innerWidth); |
| 126 | let screenHeight = Number(window.visualViewport?.height ?? window.innerHeight); |
| 127 | let visualScale = Number(window.visualViewport?.scale ?? 1); |
| 128 | |
| 129 | return { |
| 130 | width: screenWidth * visualScale, |
| 131 | height: screenHeight * visualScale, |
| 132 | angle: window.screen.orientation.angle |
| 133 | }; |
| 134 | } |
| 135 | |
| 136 | function onResizeStart(e: Event): void { |
| 137 | // So we don't constantly call clearTimeout and setTimeout, keep track of the |
no outgoing calls
no test coverage detected