From 0052c6663cc6850d06f10931e86492ce84b078de Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:14:15 +0000 Subject: [PATCH] fix top offset --- web/scripts/domWidget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/scripts/domWidget.js b/web/scripts/domWidget.js index 9a4a2b64b..8560b9204 100644 --- a/web/scripts/domWidget.js +++ b/web/scripts/domWidget.js @@ -34,7 +34,7 @@ function getClipPath(node, element, elRect) { const widgetRect = element.getBoundingClientRect(); const clipX = intersection[0] - widgetRect.x / scale + "px"; - const clipY = intersection[1] - widgetRect.y / scale + "px"; + const clipY = elRect.top + intersection[1] - widgetRect.y / scale + "px"; const clipWidth = intersection[2] + "px"; const clipHeight = intersection[3] + "px"; const path = `polygon(0% 0%, 0% 100%, ${clipX} 100%, ${clipX} ${clipY}, calc(${clipX} + ${clipWidth}) ${clipY}, calc(${clipX} + ${clipWidth}) calc(${clipY} + ${clipHeight}), ${clipX} calc(${clipY} + ${clipHeight}), ${clipX} 100%, 100% 100%, 100% 0%)`;