mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 02:11:56 +00:00
43 lines
844 B
TypeScript
43 lines
844 B
TypeScript
import { History as InnerHistory, DocumentModel as InnerDocumentModel } from '@ali/lowcode-designer';
|
|
import { historySymbol } from './symbols';
|
|
|
|
export default class History {
|
|
private readonly [historySymbol]: InnerHistory;
|
|
|
|
constructor(history: InnerHistory) {
|
|
this[historySymbol] = history;
|
|
}
|
|
|
|
go(cursor: number) {
|
|
this[historySymbol].go(cursor);
|
|
}
|
|
|
|
back() {
|
|
this[historySymbol].back();
|
|
}
|
|
|
|
forward() {
|
|
this[historySymbol].forward();
|
|
}
|
|
|
|
savePoint() {
|
|
this[historySymbol].savePoint();
|
|
}
|
|
|
|
isSavePoint() {
|
|
return this[historySymbol].isSavePoint();
|
|
}
|
|
|
|
getState() {
|
|
return this[historySymbol].getState();
|
|
}
|
|
|
|
onChangeState(func: () => any) {
|
|
return this[historySymbol].onStateChange(func);
|
|
}
|
|
|
|
onChangeCursor(func: () => any) {
|
|
return this[historySymbol].onCursor(func);
|
|
}
|
|
}
|