From be055a0d064db037783aa25b2e38f8983aa49b48 Mon Sep 17 00:00:00 2001 From: Santiago <71732018+Zasa-san@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:27:10 -0300 Subject: [PATCH] [HOTFIX] PDF sidepanel selections mismatch (#7456) * restore pdf page scale * upped version * small change + version upp --- app/react/V2/Components/PDFViewer/PDFPage.tsx | 6 ++---- package.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/react/V2/Components/PDFViewer/PDFPage.tsx b/app/react/V2/Components/PDFViewer/PDFPage.tsx index 81edee59b6..66b789acb3 100644 --- a/app/react/V2/Components/PDFViewer/PDFPage.tsx +++ b/app/react/V2/Components/PDFViewer/PDFPage.tsx @@ -52,19 +52,17 @@ const PDFPage = ({ pdf, page, highlights }: PDFPageProps) => { useEffect(() => { if (pageContainerRef.current && pdfPage) { const currentContainer = pageContainerRef.current; + const defaultViewport = pdfPage.getViewport({ scale: 1 }); const handlePlaceHolder = () => { - const defaultViewport = pdfPage.getViewport({ scale: 1 }); currentContainer.style.height = `${defaultViewport.height}px`; }; if (isVisible) { - const defaultViewport = pdfPage.getViewport({ scale: 1 }); - const pageViewer = new PDFJSViewer.PDFPageView({ container: currentContainer, id: page, - scale: 1.1, + scale: 1, defaultViewport, annotationMode: 0, eventBus: new EventBus(), diff --git a/package.json b/package.json index 040d07e42f..7dc9640e62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uwazi", - "version": "1.191.4", + "version": "1.191.5", "description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.", "keywords": [ "react"