FIX: Avoid freezing the app on frozen columns or rows

This commit is contained in:
Nicolás Hatcher
2024-12-09 22:33:22 +01:00
parent 65f1738473
commit a4a3b11858

View File

@@ -867,14 +867,18 @@ export default class WorksheetCanvas {
frozenRows, frozenRows,
frozenColumns, frozenColumns,
); );
xFrozenEnd += this.getColumnWidth( if (frozenColumns > 0) {
this.model.getSelectedSheet(), xFrozenEnd += this.getColumnWidth(
frozenColumns, this.model.getSelectedSheet(),
); frozenColumns,
yFrozenEnd += this.getRowHeight( );
this.model.getSelectedSheet(), }
frozenRows, if (frozenRows > 0) {
); yFrozenEnd += this.getRowHeight(
this.model.getSelectedSheet(),
frozenRows,
);
}
if (startRow <= frozenRows && endRow > frozenRows) { if (startRow <= frozenRows && endRow > frozenRows) {
yEnd = Math.max(yEnd, yFrozenEnd); yEnd = Math.max(yEnd, yFrozenEnd);
} }