UNPKG

reactotron-react-native

Version:

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

34 lines (33 loc) 886 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getReactNativeDimensionsWithDimensions = getReactNativeDimensionsWithDimensions; 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