Remove selected object when storing to backend (#506)
This commit is contained in:
parent
a436e70764
commit
48024c9116
@ -23,7 +23,10 @@ const probablySupportsClipboard =
|
|||||||
const scales = [1, 2, 3];
|
const scales = [1, 2, 3];
|
||||||
const defaultScale = scales.includes(devicePixelRatio) ? devicePixelRatio : 1;
|
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({
|
export function ExportDialog({
|
||||||
elements,
|
elements,
|
||||||
@ -129,7 +132,7 @@ export function ExportDialog({
|
|||||||
icon={link}
|
icon={link}
|
||||||
title={t("buttons.getShareableLink")}
|
title={t("buttons.getShareableLink")}
|
||||||
aria-label={t("buttons.getShareableLink")}
|
aria-label={t("buttons.getShareableLink")}
|
||||||
onClick={() => onExportToBackend(exportedElements, 1)}
|
onClick={() => onExportToBackend(exportedElements)}
|
||||||
/>
|
/>
|
||||||
</Stack.Row>
|
</Stack.Row>
|
||||||
|
|
||||||
|
@ -552,7 +552,10 @@ export class App extends React.Component<any, AppState> {
|
|||||||
if (this.canvas)
|
if (this.canvas)
|
||||||
exportCanvas(
|
exportCanvas(
|
||||||
"backend",
|
"backend",
|
||||||
exportedElements,
|
exportedElements.map(element => ({
|
||||||
|
...element,
|
||||||
|
isSelected: false
|
||||||
|
})),
|
||||||
this.canvas,
|
this.canvas,
|
||||||
this.state
|
this.state
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user