@contrail/document-table 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -102,7 +102,10 @@ class TableMergeService {
|
|
|
102
102
|
}
|
|
103
103
|
else {
|
|
104
104
|
element.style = util_1.ObjectUtil.mergeDeep(util_1.ObjectUtil.cloneDeep(table_service_1.TableService.DEFAULT_CELL_STYLE), firstCell.style);
|
|
105
|
-
|
|
105
|
+
if (firstCell.rotate) {
|
|
106
|
+
element.rotate = Object.assign({}, firstCell.rotate);
|
|
107
|
+
elementUndo.rotate = elementUndo.rotate || (firstCell.rotate.angle === 270 ? { angle: 0 } : { angle: 270 });
|
|
108
|
+
}
|
|
106
109
|
table_service_1.TableService.clearCell(element);
|
|
107
110
|
}
|
|
108
111
|
elementsToUpdate.push({ change: element, undo: elementUndo });
|
|
@@ -131,8 +131,10 @@ class TablePasteService {
|
|
|
131
131
|
cell.style = util_1.ObjectUtil.mergeDeep(util_1.ObjectUtil.cloneDeep(table_service_1.TableService.DEFAULT_CELL_STYLE), util_1.ObjectUtil.cloneDeep(cellToPaste.style));
|
|
132
132
|
cell.colspan = cellToPaste.colspan > 1 ? cellToPaste.colspan : 1;
|
|
133
133
|
cell.rowspan = cellToPaste.rowspan > 1 ? cellToPaste.rowspan : 1;
|
|
134
|
-
if (cellToPaste.rotate)
|
|
134
|
+
if (cellToPaste.rotate) {
|
|
135
135
|
cell.rotate = Object.assign({}, cellToPaste.rotate);
|
|
136
|
+
cellUndo.rotate = cellUndo.rotate || (cellToPaste.rotate.angle === 270 ? { angle: 0 } : { angle: 270 });
|
|
137
|
+
}
|
|
136
138
|
const cellMergedRanged = table_merge_service_1.TableMergeService.getMergedRange(tableElement, cell);
|
|
137
139
|
if (table_service_1.TableService.isVerticalCell(cell)) {
|
|
138
140
|
cell.size.height = cellMergedRanged
|