From 23f2660aa8020c7c0702a4556be39b82b82cb095 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sun, 12 Feb 2023 23:23:44 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7338 --- app/src/protyle/export/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/protyle/export/util.ts b/app/src/protyle/export/util.ts index 9e575dd03..0cf225023 100644 --- a/app/src/protyle/export/util.ts +++ b/app/src/protyle/export/util.ts @@ -96,7 +96,7 @@ export const exportImage = (id: string) => { highlightRender(previewElement); previewElement.querySelectorAll("table").forEach((item: HTMLElement) => { if (item.clientWidth > item.parentElement.clientWidth) { - item.setAttribute("style", `transform: scale(${item.parentElement.clientWidth / item.clientWidth});transform-origin: top left;`); + item.setAttribute("style", `margin-bottom:${item.parentElement.clientWidth * item.clientHeight / item.clientWidth - item.parentElement.clientHeight + 1}px;transform: scale(${item.parentElement.clientWidth / item.clientWidth});transform-origin: top left;`); item.parentElement.style.overflow = "hidden"; } });