Commit 110794f3 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Делаем zoom без пересчетов размеров сетки

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47713 954022d7-b5bf-4e40-9824-e11837661b57
parent 84088aa2
...@@ -607,7 +607,6 @@ ...@@ -607,7 +607,6 @@
return this._getRange(this.activeRange.c1, this.activeRange.r1, this.activeRange.c2, this.activeRange.r2); return this._getRange(this.activeRange.c1, this.activeRange.r1, this.activeRange.c2, this.activeRange.r2);
}, },
resize: function () { resize: function () {
this._initCellsArea(true); this._initCellsArea(true);
this._normalizeViewRange(); this._normalizeViewRange();
...@@ -616,7 +615,6 @@ ...@@ -616,7 +615,6 @@
return this; return this;
}, },
getZoom: function () { getZoom: function () {
return this.drawingCtx.getZoom(); return this.drawingCtx.getZoom();
}, },
...@@ -624,7 +622,7 @@ ...@@ -624,7 +622,7 @@
changeZoom: function (isUpdate) { changeZoom: function (isUpdate) {
if (isUpdate) { if (isUpdate) {
this.cleanSelection(); this.cleanSelection();
this._initCellsArea(true); this._initCellsArea(false);
this._normalizeViewRange(); this._normalizeViewRange();
this._cleanCellsTextMetricsCache(); this._cleanCellsTextMetricsCache();
this._shiftVisibleRange(); this._shiftVisibleRange();
...@@ -1146,6 +1144,8 @@ ...@@ -1146,6 +1144,8 @@
this.maxRowHeight = asc_calcnpt( 409, this._getPPIY() ); this.maxRowHeight = asc_calcnpt( 409, this._getPPIY() );
this.defaultRowDescender = this._calcRowDescender(this.settings.cells.fontSize); this.defaultRowDescender = this._calcRowDescender(this.settings.cells.fontSize);
this.defaultRowHeight = asc_calcnpt( this.settings.cells.fontSize * this.vspRatio, this._getPPIY() ) + this.height_1px; this.defaultRowHeight = asc_calcnpt( this.settings.cells.fontSize * this.vspRatio, this._getPPIY() ) + this.height_1px;
this._calcHeaderRowHeight();
}, },
_initCellsArea: function (fullRecalc) { _initCellsArea: function (fullRecalc) {
this.width_1px = asc_calcnpt(0, this._getPPIX(), 1/*px*/); this.width_1px = asc_calcnpt(0, this._getPPIX(), 1/*px*/);
...@@ -1157,15 +1157,12 @@ ...@@ -1157,15 +1157,12 @@
this.height_3px = asc_calcnpt(0, this._getPPIY(), 3/*px*/); this.height_3px = asc_calcnpt(0, this._getPPIY(), 3/*px*/);
// calculate rows heights and visible rows // calculate rows heights and visible rows
this.headersTop = 0;
this._calcHeaderRowHeight();
this._calcRowHeights(fullRecalc ? 1 : 0); this._calcRowHeights(fullRecalc ? 1 : 0);
this.visibleRange.r2 = 0; this.visibleRange.r2 = 0;
this._calcVisibleRows(); this._calcVisibleRows();
this._updateVisibleRowsCount(/*skipScrolReinit*/true); this._updateVisibleRowsCount(/*skipScrolReinit*/true);
// calculate columns widths and visible columns // calculate columns widths and visible columns
this.headersLeft = 0;
this._calcHeaderColumnWidth(); this._calcHeaderColumnWidth();
this._calcColumnWidths(fullRecalc ? 1 : 0); this._calcColumnWidths(fullRecalc ? 1 : 0);
this.visibleRange.c2 = 0; this.visibleRange.c2 = 0;
......
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