use commitToHistory prop for handling draw history (#1595)

This commit is contained in:
David Luzar 2020-05-14 14:51:33 +02:00 committed by GitHub
parent d9b8dcfbb4
commit 828c9c4d65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -89,7 +89,7 @@ export const actionFinalize = register({
} }
: appState.selectedElementIds, : appState.selectedElementIds,
}, },
commitToHistory: false, commitToHistory: appState.elementType === "draw",
}; };
}, },
keyTest: (event, appState) => keyTest: (event, appState) =>

View File

@ -2340,7 +2340,6 @@ class App extends React.Component<any, AppState> {
if (draggingElement?.type === "draw") { if (draggingElement?.type === "draw") {
this.actionManager.executeAction(actionFinalize); this.actionManager.executeAction(actionFinalize);
history.resumeRecording();
return; return;
} }
if (isLinearElement(draggingElement)) { if (isLinearElement(draggingElement)) {