FIX: Minimal implementation of browse mode

This commit is contained in:
Nicolás Hatcher
2024-09-28 13:55:39 +02:00
parent 90cf5f74f7
commit fde1e13ffb
9 changed files with 191 additions and 57 deletions

View File

@@ -1241,10 +1241,20 @@ export default class WorksheetCanvas {
}
private drawActiveRanges(topLeftCell: Cell, bottomRightCell: Cell): void {
const activeRanges = this.workbookState.getActiveRanges();
const activeRangesCount = activeRanges.length;
let activeRanges = this.workbookState.getActiveRanges();
const ctx = this.ctx;
ctx.setLineDash([2, 2]);
const referencedRange =
this.workbookState.getEditingCell()?.referencedRange || null;
if (referencedRange) {
activeRanges = activeRanges.concat([
{
...referencedRange.range,
color: "#343423",
},
]);
}
const activeRangesCount = activeRanges.length;
for (let rangeIndex = 0; rangeIndex < activeRangesCount; rangeIndex += 1) {
const range = activeRanges[rangeIndex];