opt: superview's subviews must be marked also

This commit is contained in:
pengfei.zhou
2021-06-25 16:36:31 +08:00
committed by osborn
parent 92b106d11f
commit c574f87b94
8 changed files with 71 additions and 6 deletions

View File

@@ -374,6 +374,14 @@ export class Superview extends View {
if (Reflect.getMetadata(key, v) === PROP_CONSIST || Reflect.getMetadata(key, v) === PROP_INCONSIST) {
v.onPropertyChanged(key, undefined, Reflect.get(v, key));
}
if (v instanceof Superview) {
for (const subview of v.allSubviews()) {
subview.superview = {};
}
}
if (v instanceof Group) {
v.dirtyProps.children = v.children.map(e => e.viewId);
}
}
}
v.superview = this;