-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reposition children when position changed #1033
fix: reposition children when position changed #1033
Conversation
…on-children-when-position-changed
…tatic and relative
kraken/lib/src/dom/element.dart
Outdated
void _updateRenderBoxModelWithPosition() { | ||
RenderBoxModel _renderBoxModel = renderBoxModel!; | ||
CSSPositionType currentPosition = renderStyle.position; | ||
// Find all the nested positioned absolute children. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释里可以描述下场景,什么场景需要用
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果有 renderStyle 树,是不是也可以在 renderStyle 找,这样可以把样式相关都解耦 element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释已补充,renderStyle 目前并不是完整的 tree 没有 children,而且这个方法需要返回 element 数组以便后续执行添加到 containing block 的操作,所以目前在 element tree 上找也是合理的。
Closes #1029