mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
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:
parent
891ac82447
commit
d3106495b2
9 changed files with 33 additions and 411 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue