UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

18 lines (17 loc) 696 B
import { IntervalBasedHistoryItem } from '../../base/interval-based-history-item'; export class AnchorInfoPropertyHistoryItem extends IntervalBasedHistoryItem { newValue; oldState; propertyManipulator; 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); } }