feat: multiplayer undo / redo (#7348)

This commit is contained in:
Marcel Mraz
2024-04-17 14:01:24 +02:00
committed by GitHub
parent 5211b003b8
commit 530617be90
71 changed files with 34883 additions and 14875 deletions
@@ -4,6 +4,7 @@ import { isFrameLikeElement } from "../element/typeChecks";
import { ExcalidrawElement } from "../element/types";
import { KEYS } from "../keys";
import { getSelectedElements } from "../scene";
import { StoreAction } from "../store";
import { arrayToMap } from "../utils";
import { register } from "./register";
@@ -66,7 +67,7 @@ export const actionToggleElementLock = register({
? null
: appState.selectedLinearElement,
},
commitToHistory: true,
storeAction: StoreAction.CAPTURE,
};
},
keyTest: (event, appState, elements, app) => {
@@ -111,7 +112,7 @@ export const actionUnlockAllElements = register({
lockedElements.map((el) => [el.id, true]),
),
},
commitToHistory: true,
storeAction: StoreAction.CAPTURE,
};
},
label: "labels.elementLock.unlockAll",