There was an error while loading. Please reload this page.
1 parent dbd3c43 commit 68818eaCopy full SHA for 68818ea
1 file changed
cocos/ui/layout.ts
@@ -1144,11 +1144,10 @@ export class Layout extends Component {
1144
}
1145
1146
protected _transformDirty (type: TransformBit): void {
1147
- if (!(type & TransformBit.SCALE) || !(type & TransformBit.POSITION) || !this._affectedByScale) {
1148
- return;
+ // Invalidate layout when scale is affected and changed, or position is changed.
+ if ((type & TransformBit.SCALE && this._affectedByScale) || (type & TransformBit.POSITION)) {
1149
+ this._doLayoutDirty();
1150
-
1151
- this._doLayoutDirty();
1152
1153
1154
protected _doLayoutDirty (): void {
0 commit comments