add isPointNotInRect

This commit is contained in:
thislight 2024-12-01 22:50:29 +08:00
parent d6c717a73e
commit c260027c9c
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E
3 changed files with 9 additions and 12 deletions

5
src/platform/dom.ts Normal file
View file

@ -0,0 +1,5 @@
export function isPointNotInRect(rect: DOMRect, ptX: number, ptY: number) {
return (
ptY < rect.top || ptY > rect.bottom || ptX < rect.left || ptX > rect.right
);
}