react-native-screen-transitions
Version:
Easy screen transitions for React Native and Expo
25 lines (23 loc) • 593 B
text/typescript
import type { MeasuredDimensions } from "react-native-reanimated";
import { Bounds } from "../../../stores/bounds";
export const isBoundsEqual = ({
measured,
key,
sharedBoundTag,
}: {
measured: MeasuredDimensions;
key: string;
sharedBoundTag: string;
}) => {
"worklet";
const existing = Bounds.getBounds(key)?.[sharedBoundTag]?.bounds;
return (
existing &&
existing.width === measured.width &&
existing.height === measured.height &&
existing.pageX === measured.pageX &&
existing.pageY === measured.pageY &&
existing.x === measured.x &&
existing.y === measured.y
);
};