vuesax-alpha
Version:
A Component Library for Vue 3
19 lines (16 loc) • 634 B
JavaScript
import { getRectRelativeToOffsetParent } from '../utils/get-rect-relative-to-offset-parent.mjs';
import { getOffsetParent } from './get-offset-parent.mjs';
const getElementRects = async function({ reference, floating, strategy }) {
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
const getDimensionsFn = this.getDimensions;
return {
reference: getRectRelativeToOffsetParent(
reference,
await getOffsetParentFn(floating),
strategy
),
floating: { x: 0, y: 0, ...await getDimensionsFn(floating) }
};
};
export { getElementRects };
//# sourceMappingURL=get-element-rects.mjs.map