Skip to content

Commit 298dead

Browse files
committed
fix: failed to modify source transform
1 parent 7bcbd5d commit 298dead

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ export default class PixiStage {
7373
const targetPosition = target.position;
7474
if (target.scale) Object.assign(targetScale, source.scale);
7575
if (target.position) Object.assign(targetPosition, source.position);
76+
Object.assign(target, source);
77+
target.scale = targetScale;
78+
target.position = targetPosition;
7679
if (convertAlpha) {
7780
const sourceAlpha = source.alpha;
7881
if (sourceAlpha !== undefined) {
79-
source.alpha = 1;
80-
(source as any).alphaFilterVal = sourceAlpha;
82+
target.alpha = 1;
83+
(target as any).alphaFilterVal = sourceAlpha;
8184
}
8285
}
83-
Object.assign(target, source);
84-
target.scale = targetScale;
85-
target.position = targetPosition;
8686
}
8787

8888
/**

0 commit comments

Comments
 (0)