MCPcopy Create free account
hub / github.com/TheOrcDev/github-creature / isPointInside

Method isPointInside

components/liquid-ether.tsx:242–252  ·  view source on GitHub ↗
(clientX: number, clientY: number)

Source from the content-addressed store, hash-verified

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;

Callers 1

updateHoverStateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected