mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-24 00:56:59 +08:00
fix top offset
This commit is contained in:
parent
ad355c601d
commit
0052c6663c
@ -34,7 +34,7 @@ function getClipPath(node, element, elRect) {
|
|||||||
|
|
||||||
const widgetRect = element.getBoundingClientRect();
|
const widgetRect = element.getBoundingClientRect();
|
||||||
const clipX = intersection[0] - widgetRect.x / scale + "px";
|
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 clipWidth = intersection[2] + "px";
|
||||||
const clipHeight = intersection[3] + "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%)`;
|
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%)`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user