EditorView.posAtCoords method
EditorView › posAtCoords
Official
Get the document position at the given screen coordinates. Returnsnull if not found. Signature:
posAtCoords(coords: EditorViewCoords): null | numberParameters:
| Parameter | Type | Description |
|---|---|---|
| coords | EditorViewCoords | The y coordinate. |
Returns: null | number — The document position or null.
Official
Get the document position at the given screen coordinates with imprecise mode.Signature:
posAtCoords(coords: EditorViewCoords, precise: false): numberParameters:
| Parameter | Type | Description |
|---|---|---|
| coords | EditorViewCoords | The y coordinate. |
| precise | false | Whether to require precise results. |
Returns: number — The document position.