MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / computeInputCursorPosition

Function computeInputCursorPosition

packages/core/src/cursor/cursorState.ts:112–122  ·  view source on GitHub ↗
(
  inputX: number,
  inputY: number,
  cursorOffset: number,
  prefix = 0,
)

Source from the content-addressed store, hash-verified

110 * @returns Cursor position in screen coordinates
111 */
112export function computeInputCursorPosition(
113 inputX: number,
114 inputY: number,
115 cursorOffset: number,
116 prefix = 0,
117): Readonly<{ x: number; y: number }> {
118 return {
119 x: inputX + prefix + cursorOffset,
120 y: inputY,
121 };
122}
123
124/**
125 * Default cursor shapes for different contexts.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected