UNPKG

reactotron-react-native

Version:

A development tool to explore, inspect, and diagnose your React Native apps.

30 lines (29 loc) 739 B
"use strict"; export function getReactNativeDimensionsWithDimensions(screen, win) { try { let screenInfo = {}; let windowInfo = {}; if (screen) { screenInfo = { screenWidth: Math.ceil(screen.width), screenHeight: Math.ceil(screen.height), screenScale: screen.scale, screenFontScale: screen.fontScale }; } if (win) { windowInfo = { windowWidth: Math.ceil(win.width), windowHeight: Math.ceil(win.height), windowScale: win.scale, windowFontScale: win.fontScale }; } return { ...screenInfo, ...windowInfo }; } catch (e) {} return null; } //# sourceMappingURL=getReactNativeDimensionsWithDimensions.js.map