19 lines
639 B
JavaScript
19 lines
639 B
JavaScript
// Metro module 5365 (f5366).
|
|
import { useLayoutEffect } from "react";
|
|
import { isFabricInstalled } from "./Module5268";
|
|
export function useBoundingClientRect(c14830_0, c14830_1) {
|
|
if (isFabricInstalled()) {
|
|
useLayoutEffect(() => {
|
|
if (c14830_0 && c14830_0.current) {
|
|
if (typeof c14830_0.current.unstable_getBoundingClientRect !== "function") {
|
|
if (typeof c14830_0.current.getBoundingClientRect === "function") {
|
|
c14830_1(c14830_0.current.getBoundingClientRect());
|
|
}
|
|
} else {
|
|
c14830_1(c14830_0.current.unstable_getBoundingClientRect());
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|