Browse Source

fix specs

aakansha-custom-elements
ad1992 4 years ago
parent
commit
1edde7291c
  1. 6
      src/actions/actionFinalize.tsx
  2. 1
      src/data/restore.ts

6
src/actions/actionFinalize.tsx

@ -151,7 +151,6 @@ export const actionFinalize = register({ @@ -151,7 +151,6 @@ export const actionFinalize = register({
} else {
activeTool.type = "selection";
}
return {
elements: newElements,
appState: {
@ -162,10 +161,7 @@ export const actionFinalize = register({ @@ -162,10 +161,7 @@ export const actionFinalize = register({
appState.activeTool.type === "freedraw") &&
multiPointElement
? appState.activeTool
: {
...appState.activeTool,
activeTool,
},
: activeTool,
draggingElement: null,
multiElement: null,
editingElement: null,

1
src/data/restore.ts

@ -263,6 +263,7 @@ export const restoreAppState = ( @@ -263,6 +263,7 @@ export const restoreAppState = (
const activeTool: any = {
lastActiveToolBeforeEraser: null,
locked: nextAppState.activeTool.locked ?? false,
type: "selection",
};
if (AllowedExcalidrawActiveTools[nextAppState.activeTool.type]) {
if (nextAppState.activeTool.type === "custom") {

Loading…
Cancel
Save