fix(ui): ensure Layout recalculates layout when a child node’s scale changes

This commit is contained in:
orchid-world
2026-02-03 10:15:23 +08:00
committed by GitHub
parent c04e6e0698
commit 100bccaf9e
+3 -4
View File
@@ -1144,11 +1144,10 @@ export class Layout extends Component {
}
protected _transformDirty (type: TransformBit): void {
if (!(type & TransformBit.SCALE) || !(type & TransformBit.POSITION) || !this._affectedByScale) {
return;
// Invalidate layout when scale is affected and changed, or position is changed.
if ((type & TransformBit.SCALE && this._affectedByScale) || (type & TransformBit.POSITION)) {
this._doLayoutDirty();
}
this._doLayoutDirty();
}
protected _doLayoutDirty (): void {