mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 07:20:21 +02:00
unify exports in a single place
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
||||
TTDDialogTrigger,
|
||||
StoreAction,
|
||||
reconcileElements,
|
||||
exportToCanvas,
|
||||
} from "../packages/excalidraw";
|
||||
import {
|
||||
exportToBlob,
|
||||
@@ -133,7 +134,6 @@ import { AIComponents } from "./components/AI";
|
||||
import { ExcalidrawPlusIframeExport } from "./ExcalidrawPlusIframeExport";
|
||||
import { fileSave } from "../packages/excalidraw/data/filesystem";
|
||||
import type { ExportToCanvasConfig } from "../packages/excalidraw/scene/export";
|
||||
import { exportToCanvas } from "../packages/utils";
|
||||
|
||||
polyfill();
|
||||
|
||||
@@ -646,8 +646,6 @@ const ExcalidrawWrapper = () => {
|
||||
(el) => el.strokeStyle === "dashed" && !el.isDeleted,
|
||||
);
|
||||
|
||||
const zoom = appState.zoom.value;
|
||||
|
||||
exportToCanvas({
|
||||
data: {
|
||||
elements: getNonDeletedElements(elements).filter(
|
||||
@@ -1401,7 +1399,7 @@ const ExcalidrawWrapper = () => {
|
||||
maxWH{" "}
|
||||
<input
|
||||
type="number"
|
||||
max={600}
|
||||
// max={600}
|
||||
style={{ width: "3rem" }}
|
||||
value={config.maxWidthOrHeight}
|
||||
onChange={(event) =>
|
||||
@@ -1409,7 +1407,7 @@ const ExcalidrawWrapper = () => {
|
||||
...s,
|
||||
maxWidthOrHeight: !event.target.value.trim()
|
||||
? undefined
|
||||
: Math.min(parseInt(event.target.value as any), 600),
|
||||
: parseInt(event.target.value as any),
|
||||
}))
|
||||
}
|
||||
/>
|
||||
@@ -1440,7 +1438,7 @@ const ExcalidrawWrapper = () => {
|
||||
exportToBlob({
|
||||
data: {
|
||||
elements: excalidrawAPI!.getSceneElements(),
|
||||
files: null,
|
||||
files: excalidrawAPI?.getFiles() || null,
|
||||
},
|
||||
config,
|
||||
}).then((blob) => {
|
||||
|
Reference in New Issue
Block a user