This change actually makes the authoring flow work for the most part by tying in emailing and more. We have also done a number of quality of life updates to simplify the codebase overall making it easier to continue work on the refresh.
11 lines
276 B
TypeScript
11 lines
276 B
TypeScript
export const getBoundingClientRect = (element: HTMLElement) => {
|
|
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 };
|
|
};
|