From 4fe89b97320fa768679212ba530b96b771818fa5 Mon Sep 17 00:00:00 2001 From: Luca Foppiano Date: Tue, 20 Aug 2024 07:13:21 +0200 Subject: [PATCH] place annotations on top of the PDF and below the text layers --- streamlit_pdf_viewer/frontend/src/PdfViewer.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/streamlit_pdf_viewer/frontend/src/PdfViewer.vue b/streamlit_pdf_viewer/frontend/src/PdfViewer.vue index f0a905c0..4d77b5b5 100644 --- a/streamlit_pdf_viewer/frontend/src/PdfViewer.vue +++ b/streamlit_pdf_viewer/frontend/src/PdfViewer.vue @@ -93,7 +93,7 @@ export default { outline: `${props.args.annotation_outline_size * scale}px solid`, outlineColor: annoObj.color, cursor: 'pointer', - 'z-index': 10 + 'z-index': 1 }; if (index) { loadedAnnotations.value.push(`annotation-${index}`); @@ -139,6 +139,7 @@ export default { const textContent = await page.getTextContent(); const textLayerDiv = document.createElement("div"); textLayerDiv.className = "textLayer" + textLayerDiv.style = "z-index: 2" // textLayerDiv.style.position = "absolute"; // textLayerDiv.style.height = `${viewport.height}px`; // textLayerDiv.style.width = `${viewport.width}px`;