Commit fe63200d authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Поправил баг http://bugzserver/show_bug.cgi?id=24060

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56960 954022d7-b5bf-4e40-9824-e11837661b57
parent 4980ff45
......@@ -544,10 +544,8 @@
WorkbookView.prototype._onScrollReinitialize = function (whichSB, callback) {
var ws = this.getWorksheet(),
vsize = !whichSB || whichSB === 1 ?
ws.getVerticalScrollRange(this.Api.isMobileVersion ? 0 : this.defaults.scroll.heightPx) : undefined,
hsize = !whichSB || whichSB === 2 ?
ws.getHorizontalScrollRange(this.Api.isMobileVersion ? 0 : this.defaults.scroll.widthPx) : undefined;
vsize = !whichSB || whichSB === 1 ? ws.getVerticalScrollRange() : undefined,
hsize = !whichSB || whichSB === 2 ? ws.getHorizontalScrollRange() : undefined;
if( vsize != undefined )
this.m_dScrollY_max = Math.max(this.controller.settings.vscrollStep * (vsize + 1), 1);
......
......@@ -509,8 +509,8 @@
return this.visibleRange.r2;
};
WorksheetView.prototype.getHorizontalScrollRange = function (scrollWidth) {
var ctxW = this.drawingCtx.getWidth() - this.cellsLeft - scrollWidth;
WorksheetView.prototype.getHorizontalScrollRange = function () {
var ctxW = this.drawingCtx.getWidth() - this.cellsLeft;
for (var w = 0, i = this.cols.length - 1; i >= 0; --i) {
w += this.cols[i].width;
if (w > ctxW) {break;}
......@@ -518,8 +518,8 @@
return i; // Диапазон скрола должен быть меньше количества столбцов, чтобы не было прибавления столбцов при перетаскивании бегунка
};
WorksheetView.prototype.getVerticalScrollRange = function (scrollHeight) {
var ctxH = this.drawingCtx.getHeight() - this.cellsTop - scrollHeight;
WorksheetView.prototype.getVerticalScrollRange = function () {
var ctxH = this.drawingCtx.getHeight() - this.cellsTop;
for (var h = 0, i = this.rows.length - 1; i >= 0; --i) {
h += this.rows[i].height;
if (h > ctxH) {break;}
......@@ -1402,6 +1402,9 @@
this.cols[i].left = x;
x += this.cols[i].width;
}
if (1 === fullRecalc)
this.nColsCount = Math.max(this.nColsCount, i);
};
/**
......@@ -1451,6 +1454,9 @@
};
y += this.rows[i].height;
}
if (1 === fullRecalc)
this.nRowsCount = Math.max(this.nRowsCount, i);
};
/** Вычисляет диапазон индексов видимых колонок */
......
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