mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
Fix x-axis and y-axis not working in clip mode.
This commit is contained in:
parent
6108d625c0
commit
6fa149756a
@ -1082,6 +1082,8 @@ class SpineWebComponentOverlay extends HTMLElement implements Disposable {
|
||||
if (clip) {
|
||||
// in clip mode, the world origin is the div center (divBounds center)
|
||||
clipToBoundStart(divBounds);
|
||||
divOriginX = divBounds.width * (xAxis * window.devicePixelRatio);
|
||||
divOriginY = divBounds.height * (yAxis * window.devicePixelRatio);
|
||||
} else {
|
||||
// get the desired point into the the div (center by default) in world coordinate
|
||||
const divX = divBounds.x + divBounds.width * (xAxis + .5);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user