devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
19 lines (18 loc) • 812 B
JavaScript
import { TableBasedHistoryItem } from './create-table-history-item';
export class InsertTableRowHistoryItem extends TableBasedHistoryItem {
targetRowIndex;
cellIntervals;
patternRow;
constructor(modelManipulator, boundSubDocument, tableIndex, patternRow, targetRowIndex, cellIntervals) {
super(modelManipulator, boundSubDocument, tableIndex);
this.targetRowIndex = targetRowIndex;
this.cellIntervals = cellIntervals;
this.patternRow = patternRow;
}
redo() {
this.modelManipulator.table.insertRow(this.boundSubDocument, this.tableIndex, this.patternRow, this.targetRowIndex, this.cellIntervals);
}
undo() {
this.modelManipulator.table.removeRow(this.boundSubDocument, this.tableIndex, this.targetRowIndex);
}
}