fix: export into svg without logo
This commit is contained in:
parent
db622871f0
commit
bcd239b91a
@ -166,6 +166,7 @@ export const exportToSvg = async (
|
|||||||
opts?: {
|
opts?: {
|
||||||
serializeAsJSON?: () => string;
|
serializeAsJSON?: () => string;
|
||||||
renderEmbeddables?: boolean;
|
renderEmbeddables?: boolean;
|
||||||
|
includeLogo?: boolean;
|
||||||
},
|
},
|
||||||
): Promise<SVGSVGElement> => {
|
): Promise<SVGSVGElement> => {
|
||||||
const {
|
const {
|
||||||
@ -182,9 +183,14 @@ export const exportToSvg = async (
|
|||||||
appState.fancyBackgroundImageKey &&
|
appState.fancyBackgroundImageKey &&
|
||||||
appState.fancyBackgroundImageKey !== "solid";
|
appState.fancyBackgroundImageKey !== "solid";
|
||||||
|
|
||||||
|
const includeLogo = (exportWithFancyBackground && opts?.includeLogo) ?? true;
|
||||||
|
|
||||||
const padding = !exportWithFancyBackground
|
const padding = !exportWithFancyBackground
|
||||||
? convertToExportPadding(exportPadding)
|
? convertToExportPadding(exportPadding)
|
||||||
: getFancyBackgroundPadding(convertToExportPadding(exportPadding), true);
|
: getFancyBackgroundPadding(
|
||||||
|
convertToExportPadding(exportPadding),
|
||||||
|
includeLogo,
|
||||||
|
);
|
||||||
|
|
||||||
let metadata = "";
|
let metadata = "";
|
||||||
if (exportEmbedScene) {
|
if (exportEmbedScene) {
|
||||||
@ -306,7 +312,7 @@ export const exportToSvg = async (
|
|||||||
},
|
},
|
||||||
theme: appState.exportWithDarkMode ? THEME.DARK : THEME.LIGHT,
|
theme: appState.exportWithDarkMode ? THEME.DARK : THEME.LIGHT,
|
||||||
contentSize,
|
contentSize,
|
||||||
includeLogo: true,
|
includeLogo,
|
||||||
});
|
});
|
||||||
|
|
||||||
offsetXAdjustment =
|
offsetXAdjustment =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user