From 85d4715313f666ec1c4949c4805c9b52183364b6 Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Mon, 17 Mar 2025 14:55:25 +0100 Subject: [PATCH] Move getBounding in scrollable case. --- spine-ts/spine-webgl/src/SpineWebComponentWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts b/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts index 31ca4fcdd..b27ab0dae 100644 --- a/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts +++ b/spine-ts/spine-webgl/src/SpineWebComponentWidget.ts @@ -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; }