summaryrefslogtreecommitdiff
path: root/web/src/components/grid/drawSelection.ts
diff options
context:
space:
mode:
Diffstat (limited to 'web/src/components/grid/drawSelection.ts')
-rw-r--r--web/src/components/grid/drawSelection.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/web/src/components/grid/drawSelection.ts b/web/src/components/grid/drawSelection.ts
index e1024a8..1b8c2ed 100644
--- a/web/src/components/grid/drawSelection.ts
+++ b/web/src/components/grid/drawSelection.ts
@@ -1,7 +1,7 @@
-import { RangeSelection, Selection } from "../../selection";
import { CellRef } from "../../types";
import excursion from "./excursion";
import { getRenderedCell, RenderedCell, RenderedGrid } from "./renderGrid";
+import { GridSelection } from "./selection";
export interface SelectionStyles {
activeCellStroke: string;
@@ -76,7 +76,7 @@ export default function drawSelection(
ctx: CanvasRenderingContext2D,
styles: SelectionStyles,
grid: RenderedGrid,
- selection: Selection | undefined,
+ selection: GridSelection | undefined,
{ pending }: { pending: boolean },
) {
ctx.clearRect(0, 0, grid.rect.width, grid.rect.height);
@@ -87,7 +87,7 @@ export default function drawSelection(
if (!activeCell) return;
- if (selection instanceof RangeSelection) {
+ if (selection.range) {
drawCellRange(ctx, styles, grid, selection.range[0], selection.range[1], {
stroke: !pending,
});