mirror of
https://github.com/documenso/documenso.git
synced 2026-07-07 03:24:58 +10:00
6faa01d384
## Description Replace the PDF renderer with an custom image renderer. This allows us to remove the "react-pdf" dependency and allows us to use a virtual list to improve performance.
11 lines
286 B
TypeScript
11 lines
286 B
TypeScript
export const getBoundingClientRect = (element: HTMLElement | Element) => {
|
|
const rect = element.getBoundingClientRect();
|
|
|
|
const { width, height } = rect;
|
|
|
|
const top = rect.top + window.scrollY;
|
|
const left = rect.left + window.scrollX;
|
|
|
|
return { top, left, width, height };
|
|
};
|