mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 03:01:16 +00:00
fix: fix historySymbol is undefined causing errores when calling the history method
This commit is contained in:
parent
433dfc4df0
commit
319b13b559
@ -56,7 +56,7 @@ export default class DocumentModel {
|
||||
this[editorSymbol] = document.designer.editor as Editor;
|
||||
this.selection = new Selection(document);
|
||||
this.detecting = new Detecting(document);
|
||||
this.history = new History(document.getHistory());
|
||||
this.history = new History(document);
|
||||
this.canvas = new Canvas(document.designer);
|
||||
|
||||
this._focusNode = Node.create(this[documentSymbol].focusNode);
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
import { History as InnerHistory, DocumentModel as InnerDocumentModel } from '@alilc/lowcode-designer';
|
||||
import { historySymbol } from './symbols';
|
||||
import { historySymbol, documentSymbol } from './symbols';
|
||||
|
||||
export default class History {
|
||||
private readonly [historySymbol]: InnerHistory;
|
||||
private readonly [documentSymbol]: InnerDocumentModel;
|
||||
|
||||
constructor(history: InnerHistory) {
|
||||
this[historySymbol] = history;
|
||||
private get [historySymbol]() {
|
||||
return this[documentSymbol].getHistory();
|
||||
}
|
||||
|
||||
constructor(document: InnerDocumentModel) {
|
||||
this[documentSymbol] = document;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user