mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
6 lines
225 B
TypeScript
6 lines
225 B
TypeScript
export const isTargetInsideBox = (target: Element, box: Element) => {
|
|
const targetRect = target.getBoundingClientRect();
|
|
const boxRect = box.getBoundingClientRect();
|
|
return targetRect.y < boxRect.y + boxRect.height;
|
|
};
|