devexpress-diagram
Version:
DevExpress Diagram Control
20 lines (17 loc) • 590 B
text/typescript
import { HistoryItem } from "../HistoryItem";
import { ModelManipulator } from "../../Model/ModelManipulator";
export class ChangePageLandscapeHistoryItem extends HistoryItem {
value: boolean;
oldValue: boolean;
constructor(value: boolean) {
super();
this.value = value;
}
redo(manipulator: ModelManipulator) {
this.oldValue = manipulator.model.pageLandscape;
manipulator.changePageLandscape(this.value);
}
undo(manipulator: ModelManipulator) {
manipulator.changePageLandscape(this.oldValue);
}
}