diff options
| author | Josh Kingsley <josh@joshkingsley.me> | 2025-11-06 22:31:12 +0200 |
|---|---|---|
| committer | Josh Kingsley <josh@joshkingsley.me> | 2025-11-06 22:31:12 +0200 |
| commit | 6ea86b1b56aebbae7edeb37b01d7bf5cd145bf60 (patch) | |
| tree | bfd0178097a56087471543950caebed5f8280040 /web/src/components/grid/selection.ts | |
| parent | dad5b47f0bb480532043df8d488f5609f731b00d (diff) | |
feat(web): change subvisions
Diffstat (limited to 'web/src/components/grid/selection.ts')
| -rw-r--r-- | web/src/components/grid/selection.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/src/components/grid/selection.ts b/web/src/components/grid/selection.ts index a24bbf5..517f8ae 100644 --- a/web/src/components/grid/selection.ts +++ b/web/src/components/grid/selection.ts @@ -1,4 +1,5 @@ import { CellRef, cellRefEquals } from "../../types"; +import { RenderedGrid } from "./renderGrid"; export type CellRange = [start: CellRef, end: CellRef]; @@ -21,3 +22,7 @@ export function extendSelection( return { ...selection, range: [selection.activeCellRef, cellRef] }; } + +export function getSelectionRange(selection: GridSelection): CellRange { + return selection.range ?? [selection.activeCellRef, selection.activeCellRef]; +} |
