MCPcopy Create free account
hub / github.com/dailydotdev/apps / getImageOriginRect

Function getImageOriginRect

packages/shared/src/components/modals/ImageModal.tsx:26–29  ·  view source on GitHub ↗
(element: Element)

Source from the content-addressed store, hash-verified

24 * the captured shape stays in one place.
25 */
26export const getImageOriginRect = (element: Element): ImageOriginRect => {
27 const { top, left, width, height } = element.getBoundingClientRect();
28 return { top, left, width, height };
29};
30
31interface ImageModalProps extends ReactModal.Props {
32 src: string;

Callers 3

FocusColumnFunction · 0.90
PostHybridColumnFunction · 0.90
useImageViewerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected