|
@@ -79,7 +79,6 @@ const ImageExportModal = ({
|
|
elements,
|
|
elements,
|
|
appState,
|
|
appState,
|
|
files,
|
|
files,
|
|
- exportPadding = DEFAULT_EXPORT_PADDING,
|
|
|
|
actionManager,
|
|
actionManager,
|
|
onExportToPng,
|
|
onExportToPng,
|
|
onExportToSvg,
|
|
onExportToSvg,
|
|
@@ -88,7 +87,6 @@ const ImageExportModal = ({
|
|
appState: AppState;
|
|
appState: AppState;
|
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
files: BinaryFiles;
|
|
files: BinaryFiles;
|
|
- exportPadding?: number;
|
|
|
|
actionManager: ActionManager;
|
|
actionManager: ActionManager;
|
|
onExportToPng: ExportCB;
|
|
onExportToPng: ExportCB;
|
|
onExportToSvg: ExportCB;
|
|
onExportToSvg: ExportCB;
|
|
@@ -116,7 +114,7 @@ const ImageExportModal = ({
|
|
exportToCanvas(exportedElements, appState, files, {
|
|
exportToCanvas(exportedElements, appState, files, {
|
|
exportBackground,
|
|
exportBackground,
|
|
viewBackgroundColor,
|
|
viewBackgroundColor,
|
|
- exportPadding,
|
|
|
|
|
|
+ exportPadding: appState.exportPadding,
|
|
})
|
|
})
|
|
.then((canvas) => {
|
|
.then((canvas) => {
|
|
// if converting to blob fails, there's some problem that will
|
|
// if converting to blob fails, there's some problem that will
|
|
@@ -134,7 +132,6 @@ const ImageExportModal = ({
|
|
files,
|
|
files,
|
|
exportedElements,
|
|
exportedElements,
|
|
exportBackground,
|
|
exportBackground,
|
|
- exportPadding,
|
|
|
|
viewBackgroundColor,
|
|
viewBackgroundColor,
|
|
]);
|
|
]);
|
|
|
|
|
|
@@ -151,8 +148,10 @@ const ImageExportModal = ({
|
|
// dunno why this is needed, but when the items wrap it creates
|
|
// dunno why this is needed, but when the items wrap it creates
|
|
// an overflow
|
|
// an overflow
|
|
overflow: "hidden",
|
|
overflow: "hidden",
|
|
|
|
+ gap: ".6rem",
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
|
|
+ {actionManager.renderAction("changeExportPadding")}
|
|
{actionManager.renderAction("changeExportBackground")}
|
|
{actionManager.renderAction("changeExportBackground")}
|
|
{someElementIsSelected && (
|
|
{someElementIsSelected && (
|
|
<CheckboxItem
|
|
<CheckboxItem
|
|
@@ -221,7 +220,6 @@ export const ImageExportDialog = ({
|
|
appState,
|
|
appState,
|
|
setAppState,
|
|
setAppState,
|
|
files,
|
|
files,
|
|
- exportPadding = DEFAULT_EXPORT_PADDING,
|
|
|
|
actionManager,
|
|
actionManager,
|
|
onExportToPng,
|
|
onExportToPng,
|
|
onExportToSvg,
|
|
onExportToSvg,
|
|
@@ -231,7 +229,6 @@ export const ImageExportDialog = ({
|
|
setAppState: React.Component<any, AppState>["setState"];
|
|
setAppState: React.Component<any, AppState>["setState"];
|
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
elements: readonly NonDeletedExcalidrawElement[];
|
|
files: BinaryFiles;
|
|
files: BinaryFiles;
|
|
- exportPadding?: number;
|
|
|
|
actionManager: ActionManager;
|
|
actionManager: ActionManager;
|
|
onExportToPng: ExportCB;
|
|
onExportToPng: ExportCB;
|
|
onExportToSvg: ExportCB;
|
|
onExportToSvg: ExportCB;
|
|
@@ -249,7 +246,6 @@ export const ImageExportDialog = ({
|
|
elements={elements}
|
|
elements={elements}
|
|
appState={appState}
|
|
appState={appState}
|
|
files={files}
|
|
files={files}
|
|
- exportPadding={exportPadding}
|
|
|
|
actionManager={actionManager}
|
|
actionManager={actionManager}
|
|
onExportToPng={onExportToPng}
|
|
onExportToPng={onExportToPng}
|
|
onExportToSvg={onExportToSvg}
|
|
onExportToSvg={onExportToSvg}
|