Skip to content
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: display none #405

Merged
merged 9 commits into from
Jun 16, 2021
Merged

fix: display none #405

merged 9 commits into from
Jun 16, 2021

Conversation

temper357
Copy link
Contributor

@temper357 temper357 commented Jun 8, 2021

Closes #400

修复 display 从 none 改成 block 后 element 不显示。

  • 原因:上一个 PR 🐛 Fix: make devtools works. #334 将 display none 的 element 改成不创建 renderObject,导致 display 从 none 改成 block 后 renderObject 不存在因此即使 markNeedsLayout 下一次 layout 时也无内容显示。
  • fix: 当 display 从 none 与非 none 之间转换时,增加动态创建与销毁 renderObject 的逻辑。

@temper357 temper357 changed the title [WIP] fix: display none fix: display none Jun 9, 2021
wssgcg1213
wssgcg1213 previously approved these changes Jun 10, 2021
Copy link
Member

@wssgcg1213 wssgcg1213 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

…none

# Conflicts:
#	kraken/lib/src/rendering/box_model.dart
#	kraken/lib/src/rendering/flex.dart
#	kraken/lib/src/rendering/intrinsic.dart
@yuanyan yuanyan merged commit 104dfa1 into main Jun 16, 2021
@yuanyan yuanyan deleted the fix/display-none branch June 16, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

display 先设置 none 再设置 block,不显示
4 participants