fix: scroller parent aware child size change

This commit is contained in:
王劲鹏 2021-06-15 16:06:57 +08:00 committed by osborn
parent 9fed9e431c
commit 9bf4072777
3 changed files with 3 additions and 2 deletions

View File

@ -123,7 +123,7 @@ - (void)afterBlended:(NSDictionary *)props {
- (void)requestLayout {
[self.childNode requestLayout];
[self.view.contentView.doricLayout apply:self.view.frame.size];
[self.view.doricLayout apply:self.view.frame.size];
}
- (void)blendView:(DoricScrollView *)view forPropName:(NSString *)name propValue:(id)prop {

View File

@ -39,6 +39,7 @@ - (void)blendView:(UIView *)view forPropName:(NSString *)name propValue:(id)prop
[self mixinSubNode:subModel];
[self blendSubNode:subModel];
}
self.view.doricLayout.resolved = NO;
} else {
[super blendView:view forPropName:name propValue:prop];
}

View File

@ -186,6 +186,6 @@ - (void)reloadParagraphStyle {
- (void)blend:(NSDictionary *)props {
[super blend:props];
[self.view.superview setNeedsLayout];
self.view.doricLayout.resolved = NO;
}
@end