83 lines
1.9 KiB
JavaScript
83 lines
1.9 KiB
JavaScript
// Metro module 5453 (f5454).
|
|
import { PixelRatio } from "react-native";
|
|
function $mk76275($env) {
|
|
return (a0, a1, a2, a3) => {
|
|
const r2 = $env[0];
|
|
r2.x = a0;
|
|
r2.y = a1;
|
|
const r4 = $env.$parent[0];
|
|
r2.width = r4.roundToNearestPixel(a2);
|
|
r2.height = r4.roundToNearestPixel(a3);
|
|
};
|
|
}
|
|
let env3343 = {};
|
|
export function areDimensionsNotEqual(a0, a1) {
|
|
return !(Math.abs(PixelRatio.getPixelSizeForLayoutSize(a0) - PixelRatio.getPixelSizeForLayoutSize(a1)) <= 1);
|
|
}
|
|
export function areDimensionsEqual(a0, a1) {
|
|
return Math.abs(PixelRatio.getPixelSizeForLayoutSize(a0) - PixelRatio.getPixelSizeForLayoutSize(a1)) <= 1;
|
|
}
|
|
export function roundOffPixel(a0) {
|
|
return PixelRatio.roundToNearestPixel(a0);
|
|
}
|
|
export function measureParentSize(a0) {
|
|
let env14853;
|
|
const r0 = env14853 = {
|
|
$parent: env3343
|
|
};
|
|
const r1 = {
|
|
x: 0,
|
|
y: 0,
|
|
width: 0,
|
|
height: 0
|
|
};
|
|
env14853[0] = r1;
|
|
a0.measureLayout(a0, $mk76275(r0));
|
|
return {
|
|
width: r1.width,
|
|
height: r1.height
|
|
};
|
|
}
|
|
export function measureFirstChildLayout(a0, a1) {
|
|
let env14854;
|
|
const r1 = env14854 = {
|
|
$parent: env3343
|
|
};
|
|
const r0 = {
|
|
x: 0,
|
|
y: 0,
|
|
width: 0,
|
|
height: 0
|
|
};
|
|
env14854[0] = r0;
|
|
a0.measureLayout(a1, $mk76275(r1));
|
|
return r0;
|
|
}
|
|
export function measureItemLayout(a0, a1) {
|
|
let env14855;
|
|
const r3 = env14855 = {
|
|
$parent: env3343
|
|
};
|
|
const r1 = {
|
|
x: 0,
|
|
y: 0,
|
|
width: 0,
|
|
height: 0
|
|
};
|
|
env14855[0] = r1;
|
|
a0.measureLayout(a0, $mk76275(r3));
|
|
if (a1) {
|
|
const width = r1.width;
|
|
const width2 = a1.width;
|
|
if (Math.abs(PixelRatio.getPixelSizeForLayoutSize(width) - PixelRatio.getPixelSizeForLayoutSize(width2)) <= 1) {
|
|
r1.width = a1.width;
|
|
}
|
|
const height = r1.height;
|
|
const height2 = a1.height;
|
|
if (Math.abs(PixelRatio.getPixelSizeForLayoutSize(height) - PixelRatio.getPixelSizeForLayoutSize(height2)) <= 1) {
|
|
r1.height = a1.height;
|
|
}
|
|
}
|
|
return r1;
|
|
}
|