Move getBounding in scrollable case.

This commit is contained in:
Davide Tantillo 2025-03-17 14:55:25 +01:00
parent 1233d876a3
commit 85d4715313

View File

@ -1961,8 +1961,8 @@ class SpineWebComponentOverlay extends HTMLElement implements OverlayAttributes,
this.cursorCanvasX = input.x - window.scrollX;
this.cursorCanvasY = input.y - window.scrollY;
const ref = this.parentElement!.getBoundingClientRect();
if (this.scrollable) {
const ref = this.parentElement!.getBoundingClientRect();
this.cursorCanvasX -= ref.left;
this.cursorCanvasY -= ref.top;
}