Commit 4c49bf30 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix recalc on resize (previos delete descender)

parent d65bfd2c
......@@ -134,8 +134,6 @@ var c_oAscMouseMoveLockedObjectType = {
Sheet: 2
};
var c_oAscLockTypeElem = {
Range: 1,
Object: 2,
......
......@@ -4197,7 +4197,7 @@ function OfflineEditor () {
do {
worksheet.nColsCount = worksheet.cols.length + 1;
worksheet._calcWidthColumns(2); // fullRecalc
worksheet._calcWidthColumns(AscCommonExcel.recalcType.newLines);
if (logicToXMAX < worksheet.cols[worksheet.cols.length - 1].left) {
break
......@@ -4231,7 +4231,7 @@ function OfflineEditor () {
do {
worksheet.nRowsCount = worksheet.rows.length + 1;
worksheet._calcHeightRows(2); // fullRecalc
worksheet._calcHeightRows(AscCommonExcel.recalcType.newLines);
if (logicToYMAX < worksheet.rows[worksheet.rows.length - 1].top) {
break
......@@ -4274,7 +4274,7 @@ function OfflineEditor () {
do {
worksheet.nColsCount = worksheet.cols.length + 1;
worksheet._calcWidthColumns(2); // fullRecalc
worksheet._calcWidthColumns(AscCommonExcel.recalcType.newLines);
if (col < worksheet.cols[worksheet.cols.length - 1].left) {
break
......@@ -4286,7 +4286,7 @@ function OfflineEditor () {
do {
worksheet.nRowsCount = worksheet.rows.length + 1;
worksheet._calcHeightRows(2); // fullRecalc
worksheet._calcHeightRows(AscCommonExcel.recalcType.newLines);
if (row < worksheet.rows[worksheet.rows.length - 1].top) {
break
......@@ -4299,7 +4299,7 @@ function OfflineEditor () {
if (col >= worksheet.cols.length) {
do {
worksheet.nColsCount = worksheet.cols.length + 1;
worksheet._calcWidthColumns(2); // fullRecalc
worksheet._calcWidthColumns(AscCommonExcel.recalcType.newLines);
if (col < worksheet.cols.length)
break
......@@ -4309,7 +4309,7 @@ function OfflineEditor () {
if (row >= worksheet.rows.length) {
do {
worksheet.nRowsCount = worksheet.rows.length + 1;
worksheet._calcHeightRows(2); // fullRecalc
worksheet._calcHeightRows(AscCommonExcel.recalcType.newLines);
if (row < worksheet.rows.length)
break
......
......@@ -64,9 +64,17 @@
/** @const */
var kArrayL = "array";
var recalcType = {
recalc : 0, // без пересчета
full : 1, // пересчитываем все
newLines: 2 // пересчитываем новые строки
};
function applyFunction(callback) {
if (kFunctionL === typeof callback)
if (kFunctionL === typeof callback) {
callback.apply(null, Array.prototype.slice.call(arguments, 1));
}
}
function typeOf(obj) {
......@@ -1845,6 +1853,7 @@
var prot;
window['Asc'] = window['Asc'] || {};
window['AscCommonExcel'] = window['AscCommonExcel'] || {};
window["AscCommonExcel"].recalcType = recalcType;
window["AscCommonExcel"].applyFunction = applyFunction;
window["Asc"].typeOf = typeOf;
window["Asc"].lastIndexOf = lastIndexOf;
......
......@@ -2454,7 +2454,7 @@
WorkbookView.prototype.reInit = function() {
var ws = this.getWorksheet();
ws._initCellsArea(/*fullRecalc*/true);
ws._initCellsArea(AscCommonExcel.recalcType.full);
ws._updateVisibleColsCount();
ws._updateVisibleRowsCount();
};
......
This diff is collapsed.
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