From b31765d0ab1e0755f7cabce9267def2bd3b5064c Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 7 Dec 2023 12:33:52 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/9831 --- app/src/asset/anno.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/asset/anno.ts b/app/src/asset/anno.ts index 5400de0ea..164bc000d 100644 --- a/app/src/asset/anno.ts +++ b/app/src/asset/anno.ts @@ -553,12 +553,12 @@ const showHighlight = (selected: IPdfAnno, pdf: any, hl?: boolean) => { if (!textLayerElement.lastElementChild) { return; } - const viewport = page.viewport; + + const viewport = page.viewport.clone({rotation: 0}); // rotation https://github.com/siyuan-note/siyuan/issues/9831 if (textLayerElement.lastElementChild.classList.contains("endOfContent")) { textLayerElement.insertAdjacentHTML("beforeend", "
"); } textLayerElement = textLayerElement.lastElementChild; - let html = `
`; selected.coords.forEach((rect) => { const bounds = viewport.convertToViewportRectangle(rect);