| 240 | this.container = null; |
| 241 | } |
| 242 | private isPointInside(clientX: number, clientY: number) { |
| 243 | if (!this.container) return false; |
| 244 | const rect = this.container.getBoundingClientRect(); |
| 245 | if (rect.width === 0 || rect.height === 0) return false; |
| 246 | return ( |
| 247 | clientX >= rect.left && |
| 248 | clientX <= rect.right && |
| 249 | clientY >= rect.top && |
| 250 | clientY <= rect.bottom |
| 251 | ); |
| 252 | } |
| 253 | private updateHoverState(clientX: number, clientY: number) { |
| 254 | this.isHoverInside = this.isPointInside(clientX, clientY); |
| 255 | return this.isHoverInside; |