mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix many syncing issues (#952)
This commit is contained in:
parent
b20d4539c0
commit
3f8144ef85
15 changed files with 176 additions and 100 deletions
|
@ -9,6 +9,7 @@ import { KEYS } from "../keys";
|
|||
import { getShortcutKey } from "../utils";
|
||||
import useIsMobile from "../is-mobile";
|
||||
import { register } from "./register";
|
||||
import { newElementWith } from "../element/mutateElement";
|
||||
|
||||
export const actionChangeViewBackgroundColor = register({
|
||||
name: "changeViewBackgroundColor",
|
||||
|
@ -33,9 +34,11 @@ export const actionChangeViewBackgroundColor = register({
|
|||
export const actionClearCanvas = register({
|
||||
name: "clearCanvas",
|
||||
commitToHistory: () => true,
|
||||
perform: () => {
|
||||
perform: elements => {
|
||||
return {
|
||||
elements: [],
|
||||
elements: elements.map(element =>
|
||||
newElementWith(element, { isDeleted: true }),
|
||||
),
|
||||
appState: getDefaultAppState(),
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue