mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Move getBounding in scrollable case.
This commit is contained in:
parent
1233d876a3
commit
85d4715313
@ -1961,8 +1961,8 @@ class SpineWebComponentOverlay extends HTMLElement implements OverlayAttributes,
|
|||||||
this.cursorCanvasX = input.x - window.scrollX;
|
this.cursorCanvasX = input.x - window.scrollX;
|
||||||
this.cursorCanvasY = input.y - window.scrollY;
|
this.cursorCanvasY = input.y - window.scrollY;
|
||||||
|
|
||||||
const ref = this.parentElement!.getBoundingClientRect();
|
|
||||||
if (this.scrollable) {
|
if (this.scrollable) {
|
||||||
|
const ref = this.parentElement!.getBoundingClientRect();
|
||||||
this.cursorCanvasX -= ref.left;
|
this.cursorCanvasX -= ref.left;
|
||||||
this.cursorCanvasY -= ref.top;
|
this.cursorCanvasY -= ref.top;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user