Skip to content

Commit d484da1

Browse files
authored
fix: figure initial position
1 parent b019fcb commit d484da1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/webgal/src/Core/controller/stage/pixi/PixiController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ export default class PixiStage {
563563
const targetHeight = originalHeight * targetScale;
564564
thisFigureContainer.setBaseY(this.stageHeight / 2);
565565
if (targetHeight < this.stageHeight) {
566-
thisFigureContainer.setBaseY(this.stageHeight / 2 + this.stageHeight - targetHeight / 2);
566+
thisFigureContainer.setBaseY(this.stageHeight / 2 + (this.stageHeight - targetHeight) / 2);
567567
}
568568
if (presetPosition === 'center') {
569569
thisFigureContainer.setBaseX(this.stageWidth / 2);
@@ -673,7 +673,7 @@ export default class PixiStage {
673673

674674
let baseY = stageHeight / 2;
675675
if (targetHeight < stageHeight) {
676-
baseY = stageHeight / 2 + stageHeight - targetHeight / 2;
676+
baseY = stageHeight / 2 + (stageHeight - targetHeight) / 2;
677677
}
678678
thisFigureContainer.setBaseY(baseY);
679679
if (pos === 'center') {

0 commit comments

Comments
 (0)