devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
15 lines (14 loc) • 653 B
JavaScript
import { IntervalBasedHistoryItem } from '../base/interval-based-history-item';
export class NonVisualDrawingObjectInfoPropertyHistoryItem extends IntervalBasedHistoryItem {
constructor(modelManipulator, subDocInterval, newValue, propertyManipulator) {
super(modelManipulator, subDocInterval);
this.newValue = newValue;
this.propertyManipulator = propertyManipulator;
}
redo() {
this.oldState = this.propertyManipulator.setValue(this.boundSubDocument, this.interval, this.newValue);
}
undo() {
this.propertyManipulator.restoreValue(this.boundSubDocument, this.oldState);
}
}