Commit 43ecf8c1 authored by GoshaZotov's avatar GoshaZotov

+ for columns width

parent 9be7cd5d
...@@ -9550,6 +9550,7 @@ ...@@ -9550,6 +9550,7 @@
return dxf; return dxf;
}; };
var colsWidth = {};
var putInsertedCellIntoRange = function(nRow, nCol, pasteRow, pasteCol, rowDiff, colDiff, range, newVal) var putInsertedCellIntoRange = function(nRow, nCol, pasteRow, pasteCol, rowDiff, colDiff, range, newVal)
{ {
var pastedRangeProps = {}; var pastedRangeProps = {};
...@@ -9610,7 +9611,11 @@ ...@@ -9610,7 +9611,11 @@
} }
pastedRangeProps.tableDxf = getTableDxf(pasteRow, pasteCol, newVal); pastedRangeProps.tableDxf = getTableDxf(pasteRow, pasteCol, newVal);
pastedRangeProps.width = val._getCol(pasteCol); if(undefined === colsWidth[nCol])
{
colsWidth[nCol] = val._getCol(pasteCol);
}
pastedRangeProps.colsWidth = colsWidth;
//apply props by cell //apply props by cell
var formulaProps = {firstRange: firstRange, arrFormula: arrFormula, tablesMap: tablesMap, newVal: newVal, isOneMerge: isOneMerge, val: val}; var formulaProps = {firstRange: firstRange, arrFormula: arrFormula, tablesMap: tablesMap, newVal: newVal, isOneMerge: isOneMerge, val: val};
...@@ -9760,12 +9765,16 @@ ...@@ -9760,12 +9765,16 @@
//column width //column width
if(specialPasteProps.width && rangeStyle.width) var col = range.bbox.c1;
if(specialPasteProps.width && rangeStyle.colsWidth[col])
{ {
var widthProp = rangeStyle.width; var widthProp = rangeStyle.colsWidth[col];
t.model.setColWidth(widthProp.width, range.bbox.c1, range.bbox.c1);
t.model.setColHidden(widthProp.hd, range.bbox.c1, range.bbox.c1); t.model.setColWidth(widthProp.width, col, col);
t.model.setColBestFit(widthProp.BestFit, widthProp.width, range.bbox.c1, range.bbox.c1); t.model.setColHidden(widthProp.hd, col, col);
t.model.setColBestFit(widthProp.BestFit, widthProp.width, col, col);
rangeStyle.colsWidth[col] = null;
} }
//offsetLast //offsetLast
......
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