Commit 0755ee91 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug 33381

parent e043ec59
...@@ -1255,22 +1255,22 @@ ...@@ -1255,22 +1255,22 @@
this.model.selectionRange; this.model.selectionRange;
}; };
WorksheetView.prototype._fixVisibleRange = function ( range ) { WorksheetView.prototype._fixVisibleRange = function (range) {
var tmp; var tmp;
if ( null !== this.topLeftFrozenCell ) { if (null !== this.topLeftFrozenCell) {
tmp = this.topLeftFrozenCell.getRow0(); tmp = this.topLeftFrozenCell.getRow0();
if ( range.r1 < tmp ) { if (range.r1 < tmp) {
range.r1 = tmp; range.r1 = tmp;
tmp = this._findVisibleRow( range.r1, +1 ); tmp = this._findVisibleRow(range.r1, +1);
if ( 0 < tmp ) { if (0 < tmp) {
range.r1 = tmp; range.r1 = tmp;
} }
} }
tmp = this.topLeftFrozenCell.getCol0(); tmp = this.topLeftFrozenCell.getCol0();
if ( range.c1 < tmp ) { if (range.c1 < tmp) {
range.c1 = tmp; range.c1 = tmp;
tmp = this._findVisibleCol( range.c1, +1 ); tmp = this._findVisibleCol(range.c1, +1);
if ( 0 < tmp ) { if (0 < tmp) {
range.c1 = tmp; range.c1 = tmp;
} }
} }
...@@ -5455,10 +5455,10 @@ ...@@ -5455,10 +5455,10 @@
WorksheetView.prototype.scrollVertical = function (delta, editor) { WorksheetView.prototype.scrollVertical = function (delta, editor) {
var vr = this.visibleRange; var vr = this.visibleRange;
var start = this._calcCellPosition(vr.c1, vr.r1, 0, delta).row; var fixStartRow = new asc_Range(vr.c1, vr.r1, vr.c2, vr.r1);
var fixStartRow = new asc_Range(vr.c1, start, vr.c2, start); this._fixSelectionOfHiddenCells(0, delta >= 0 ? +1 : -1, fixStartRow);
fixStartRow.startCol = vr.c1; var start = this._calcCellPosition(vr.c1, fixStartRow.r1, 0, delta).row;
fixStartRow.startRow = start; fixStartRow.assign(vr.c1, start, vr.c2, start);
this._fixSelectionOfHiddenCells(0, delta >= 0 ? +1 : -1, fixStartRow); this._fixSelectionOfHiddenCells(0, delta >= 0 ? +1 : -1, fixStartRow);
this._fixVisibleRange(fixStartRow); this._fixVisibleRange(fixStartRow);
var reinitScrollY = start !== fixStartRow.r1; var reinitScrollY = start !== fixStartRow.r1;
...@@ -5659,10 +5659,10 @@ ...@@ -5659,10 +5659,10 @@
WorksheetView.prototype.scrollHorizontal = function (delta, editor) { WorksheetView.prototype.scrollHorizontal = function (delta, editor) {
var vr = this.visibleRange; var vr = this.visibleRange;
var start = this._calcCellPosition(vr.c1, vr.r1, delta, 0).col; var fixStartCol = new asc_Range(vr.c1, vr.r1, vr.c1, vr.r2);
var fixStartCol = new asc_Range(start, vr.r1, start, vr.r2); this._fixSelectionOfHiddenCells(delta >= 0 ? +1 : -1, 0, fixStartCol);
fixStartCol.startCol = start; var start = this._calcCellPosition(fixStartCol.c1, vr.r1, delta, 0).col;
fixStartCol.startRow = vr.r1; fixStartCol.assign(start, vr.r1, start, vr.r2);
this._fixSelectionOfHiddenCells(delta >= 0 ? +1 : -1, 0, fixStartCol); this._fixSelectionOfHiddenCells(delta >= 0 ? +1 : -1, 0, fixStartCol);
this._fixVisibleRange(fixStartCol); this._fixVisibleRange(fixStartCol);
var reinitScrollX = start !== fixStartCol.c1; var reinitScrollX = start !== fixStartCol.c1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment