( s: SelectionState, col: number, row: number, )
| 77 | } |
| 78 | |
| 79 | export function startSelection( |
| 80 | s: SelectionState, |
| 81 | col: number, |
| 82 | row: number, |
| 83 | ): void { |
| 84 | s.anchor = { col, row } |
| 85 | // Focus is not set until the first drag motion. A click-release with no |
| 86 | // drag leaves focus null → hasSelection/selectionBounds return false/null |
| 87 | // via the `!s.focus` check, so a bare click never highlights a cell. |
| 88 | s.focus = null |
| 89 | s.isDragging = true |
| 90 | s.anchorSpan = null |
| 91 | s.scrolledOffAbove = [] |
| 92 | s.scrolledOffBelow = [] |
| 93 | s.scrolledOffAboveSW = [] |
| 94 | s.scrolledOffBelowSW = [] |
| 95 | s.virtualAnchorRow = undefined |
| 96 | s.virtualFocusRow = undefined |
| 97 | s.lastPressHadAlt = false |
| 98 | } |
| 99 | |
| 100 | export function updateSelection( |
| 101 | s: SelectionState, |
no outgoing calls
no test coverage detected