|
@@ -130,6 +130,7 @@ export default class History {
|
|
|
this.goPreForPoints(item.points)
|
|
|
this.goPreForWalls(item.walls)
|
|
|
this.goPreForTags(item.tags)
|
|
|
+ this.goPreForCells(item.cells)
|
|
|
this.goPreForTables(item.tables)
|
|
|
this.goPreForRectangles(item.rectangles)
|
|
|
this.goPreForCircles(item.circles)
|
|
@@ -223,6 +224,22 @@ export default class History {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ goPreForCells(itemForCells) {
|
|
|
+ for (let i = 0; i < itemForCells.length; ++i) {
|
|
|
+ const item = itemForCells[i]
|
|
|
+ if (item.handle == HistoryEvents.AddCell) {
|
|
|
+ tableService.deleteCell(item.cell.id)
|
|
|
+ } else if (item.handle == HistoryEvents.DeleteCell) {
|
|
|
+ let newCell = tableService.createCell(item.cell.parent,item.cell.id)
|
|
|
+ historyUtil.assignCellFromCell(newCell, item.cell)
|
|
|
+ } else if (item.handle == HistoryEvents.ModifyCell) {
|
|
|
+ const preCell = item.preCell
|
|
|
+ let curCell = floorplanService.getCell(item.curCell.id)
|
|
|
+ historyUtil.assignCellFromCell(curCell, preCell)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
goPreForTables(itemForTables) {
|
|
|
for (let i = 0; i < itemForTables.length; ++i) {
|
|
|
const item = itemForTables[i]
|
|
@@ -396,6 +413,22 @@ export default class History {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ goNextForCells(itemForCells) {
|
|
|
+ for (let i = 0; i < itemForCells.length; ++i) {
|
|
|
+ const item = itemForCells[i]
|
|
|
+ if (item.handle == HistoryEvents.AddCell) {
|
|
|
+ let vCell = tableService.createCell(item.cell.parent, item.cell.id)
|
|
|
+ historyUtil.assignCellFromCell(vCell, item.cell)
|
|
|
+ } else if (item.handle == HistoryEvents.DeleteCell) {
|
|
|
+ tableService.deleteCell(item.cell.id)
|
|
|
+ } else if (item.handle == HistoryEvents.ModifyCell) {
|
|
|
+ const curCell = item.curCell
|
|
|
+ let preCell = floorplanService.getCell(item.curCell.id)
|
|
|
+ historyUtil.assignCellFromCell(preCell, curCell)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
goNextForTables(itemForTables) {
|
|
|
for (let i = 0; i < itemForTables.length; ++i) {
|
|
|
const item = itemForTables[i]
|
|
@@ -553,6 +586,7 @@ export default class History {
|
|
|
this.goNextForPoints(item.points)
|
|
|
this.goNextForWalls(item.walls)
|
|
|
this.goNextForTags(item.tags)
|
|
|
+ this.goNextForCells(item.cells)
|
|
|
this.goNextForTables(item.tables)
|
|
|
this.goNextForRectangles(item.rectangles)
|
|
|
this.goNextForCircles(item.circles)
|