feat: retrieve bounding rectangle of element & store in rectangle
This commit is contained in:
@@ -22,6 +22,7 @@ export const getRect = async (page: Page, coordinates: Coordinates) => {
|
|||||||
const { parentElement } = el;
|
const { parentElement } = el;
|
||||||
// Match the logic in recorder.ts for link clicks
|
// Match the logic in recorder.ts for link clicks
|
||||||
const element = parentElement?.tagName === 'A' ? parentElement : el;
|
const element = parentElement?.tagName === 'A' ? parentElement : el;
|
||||||
|
const rectangle = element?.getBoundingClientRect();
|
||||||
|
|
||||||
}},
|
}},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user