From f781579d5dda66dc374dbfcb87e4db66787baa71 Mon Sep 17 00:00:00 2001 From: HenestrosaDev Date: Fri, 14 Jun 2024 15:40:43 +0200 Subject: [PATCH] Fix `SimplePdfReader` for screens below the `md` breakpoint --- .../js/Components/Common/SimplePdfReader.vue | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/resources/js/Components/Common/SimplePdfReader.vue b/resources/js/Components/Common/SimplePdfReader.vue index 6f22f57..bdba556 100644 --- a/resources/js/Components/Common/SimplePdfReader.vue +++ b/resources/js/Components/Common/SimplePdfReader.vue @@ -105,8 +105,8 @@ const renderTextLayer = (textContent, viewport) => { // Get canvas offset const rect = $canvas.value.getBoundingClientRect(); const canvasOffset = { - top: rect.top + window.scrollY, - left: rect.left + window.scrollX, + top: rect.top + window.scrollY - 20, + left: rect.left + window.scrollX - 20, }; // Clear HTML for text layer @@ -188,22 +188,24 @@ const onWheel = (event) => {