Fix 1 pixel misalignment in non clip mode.

This commit is contained in:
Davide Tantillo 2024-09-26 15:45:19 +02:00
parent 3d77f1c26e
commit 3b4ab02d92

View File

@ -1025,7 +1025,7 @@ class SpineWebComponentOverlay extends HTMLElement {
} 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);
const divY = divBounds.y + divBounds.height * (-yAxis + .5); const divY = divBounds.y + divBounds.height * (-yAxis + .5) - 1;
this.screenToWorld(tempVector, divX, divY); this.screenToWorld(tempVector, divX, divY);
divOriginX = tempVector.x; divOriginX = tempVector.x;
divOriginY = tempVector.y; divOriginY = tempVector.y;