mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix(ui): ensure Layout recalculates layout when a child node’s scale changes
This commit is contained in:
+3
-4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user