MCPcopy Create free account
hub / github.com/SplootCode/splootcode / getCoordinates

Method getCoordinates

packages/editor/src/context/cursor_map.ts:252–260  ·  view source on GitHub ↗
(position: CursorPosition)

Source from the content-addressed store, hash-verified

250 }
251
252 getCoordinates(position: CursorPosition): [number, number] {
253 const entries = this.getEntryListForLineIndex(position.lineIndex)
254 const line = this.lines[position.lineIndex]
255 const cursorEntry = entries[position.entryIndex]
256 if (cursorEntry.isCursor) {
257 return [cursorEntry.xCoord + 3, line.yCoord + line.marginTop]
258 }
259 return [cursorEntry.xCoord, line.yCoord + line.marginTop]
260 }
261
262 getBoundingBoxForNodeCursor(position: CursorPosition): [number, number, number, number] {
263 const entries = this.getEntryListForLineIndex(position.lineIndex)

Callers 3

getCursorXYPositionMethod · 0.80
setSelectionCursorMethod · 0.80

Calls 1

Tested by

no test coverage detected