MCPcopy Create free account
hub / github.com/editablejs/editable / isPointerInGraceArea

Function isPointerInGraceArea

packages/ui/src/menu.tsx:998–1002  ·  view source on GitHub ↗
(event: React.PointerEvent, area?: Polygon)

Source from the content-addressed store, hash-verified

996}
997
998function isPointerInGraceArea(event: React.PointerEvent, area?: Polygon) {
999 if (!area) return false
1000 const cursorPos = { x: event.clientX, y: event.clientY }
1001 return isPointInPolygon(cursorPos, area)
1002}
1003
1004function whenMouse<E>(handler: React.PointerEventHandler<E>): React.PointerEventHandler<E> {
1005 return event => (event.pointerType === 'mouse' ? handler(event) : undefined)

Callers 1

menu.tsxFile · 0.85

Calls 1

isPointInPolygonFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…