(rect: DOMRect, point: Point)
| 98 | } |
| 99 | |
| 100 | function rectContains(rect: DOMRect, point: Point): boolean { |
| 101 | return ( |
| 102 | point.x >= rect.left - PADDING && |
| 103 | point.x <= rect.right + PADDING && |
| 104 | point.y >= rect.top - PADDING && |
| 105 | point.y <= rect.bottom + PADDING |
| 106 | ); |
| 107 | } |
| 108 | |
| 109 | function rectCorners(rect: DOMRect): Point[] { |
| 110 | let left = rect.left - PADDING; |