mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +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) {
|
if (clip) {
|
||||||
// in clip mode, the world origin is the div center (divBounds center)
|
// in clip mode, the world origin is the div center (divBounds center)
|
||||||
clipToBoundStart(divBounds);
|
clipToBoundStart(divBounds);
|
||||||
|
divOriginX = divBounds.width * (xAxis * window.devicePixelRatio);
|
||||||
|
divOriginY = divBounds.height * (yAxis * window.devicePixelRatio);
|
||||||
} else {
|
} else {
|
||||||
// get the desired point into the the div (center by default) in world coordinate
|
// get the desired point into the the div (center by default) in world coordinate
|
||||||
const divX = divBounds.x + divBounds.width * (xAxis + .5);
|
const divX = divBounds.x + divBounds.width * (xAxis + .5);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user