1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2025-02-18 13:29:36 +01:00

Remove selected object when storing to backend (#506)

This commit is contained in:
Lipis 2020-01-22 18:27:44 +02:00 committed by GitHub
parent a436e70764
commit 48024c9116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

@ -23,7 +23,10 @@ const probablySupportsClipboard =
const scales = [1, 2, 3];
const defaultScale = scales.includes(devicePixelRatio) ? devicePixelRatio : 1;
type ExportCB = (elements: readonly ExcalidrawElement[], scale: number) => void;
type ExportCB = (
elements: readonly ExcalidrawElement[],
scale?: number
) => void;
export function ExportDialog({
elements,
@ -129,7 +132,7 @@ export function ExportDialog({
icon={link}
title={t("buttons.getShareableLink")}
aria-label={t("buttons.getShareableLink")}
onClick={() => onExportToBackend(exportedElements, 1)}
onClick={() => onExportToBackend(exportedElements)}
/>
</Stack.Row>

@ -552,7 +552,10 @@ export class App extends React.Component<any, AppState> {
if (this.canvas)
exportCanvas(
"backend",
exportedElements,
exportedElements.map(element => ({
...element,
isSelected: false
})),
this.canvas,
this.state
);