File tree Expand file tree Collapse file tree
packages/webgal/src/Core/controller/stage/pixi Expand file tree Collapse file tree Original file line number Diff line number Diff 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' ) {
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ export async function addSpineFigureImpl(
126126 const targetHeight = originalHeight * targetScale ;
127127 thisFigureContainer . setBaseY ( this . stageHeight / 2 ) ;
128128 if ( targetHeight < this . stageHeight ) {
129- thisFigureContainer . setBaseY ( this . stageHeight / 2 + this . stageHeight - targetHeight / 2 ) ;
129+ thisFigureContainer . setBaseY ( this . stageHeight / 2 + ( this . stageHeight - targetHeight ) / 2 ) ;
130130 }
131131 if ( presetPosition === 'center' ) {
132132 thisFigureContainer . setBaseX ( this . stageWidth / 2 ) ;
You can’t perform that action at this time.
0 commit comments