Library MVP (#1787)

Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
Pete Hunt 2020-07-10 02:20:23 -07:00 committed by GitHub
parent 7ab0c1aba8
commit 6428b59ccb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 599 additions and 20 deletions

View file

@ -348,11 +348,12 @@ export const exportCanvas = async (
window.alert(t("alerts.couldNotCopyToClipboard"));
}
} else if (type === "backend") {
const appState = getDefaultAppState();
if (exportBackground) {
appState.viewBackgroundColor = viewBackgroundColor;
}
exportToBackend(elements, appState);
exportToBackend(elements, {
...appState,
viewBackgroundColor: exportBackground
? appState.viewBackgroundColor
: getDefaultAppState().viewBackgroundColor,
});
}
// clean up the DOM