fix: make history local to a given excalidraw instance (#3481)

* fix: make history local to a given excalidraw instance

* changelog

* Update src/packages/excalidraw/CHANGELOG.md
This commit is contained in:
Aakansha Doshi 2021-04-24 18:21:02 +05:30 committed by GitHub
parent 891ac82447
commit d3106495b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 411 deletions

View file

@ -28,7 +28,7 @@ const clearAppStatePropertiesForHistory = (appState: AppState) => {
};
};
export class SceneHistory {
class History {
private elementCache = new Map<string, Map<number, ExcalidrawElement>>();
private recording: boolean = true;
private stateHistory: DehydratedHistoryEntry[] = [];
@ -260,7 +260,4 @@ export class SceneHistory {
}
}
export const createHistory: () => { history: SceneHistory } = () => {
const history = new SceneHistory();
return { history };
};
export default History;