Function
computeInputCursorPosition
(
inputX: number,
inputY: number,
cursorOffset: number,
prefix = 0,
)
Source from the content-addressed store, hash-verified
| 110 | * @returns Cursor position in screen coordinates |
| 111 | */ |
| 112 | export 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. |
Tested by
no test coverage detected