MCPcopy Create free account
hub / github.com/apple/embedding-atlas / valueForEvent

Function valueForEvent

packages/utils/src/interaction_handler.ts:60–68  ·  view source on GitHub ↗
(e: MouseEvent)

Source from the content-addressed store, hash-verified

58const DRAG_THRESHOLD = 2;
59
60function valueForEvent(e: MouseEvent): CursorValue {
61 return {
62 clientX: e.clientX,
63 clientY: e.clientY,
64 pageX: e.pageX,
65 pageY: e.pageY,
66 modifiers: { shift: e.shiftKey, ctrl: e.ctrlKey, alt: e.altKey, meta: e.metaKey },
67 };
68}
69
70export function interactionHandler(element: SVGElement | HTMLElement, props: InteractionHandlerProps) {
71 let handlers = props;

Callers 4

onMouseDownFunction · 0.85
onMoveFunction · 0.85
onUpFunction · 0.85
onMouseMoveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected