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

chore: flex布局设置优化 #9949

Merged
merged 2 commits into from
Apr 1, 2024
Merged

chore: flex布局设置优化 #9949

merged 2 commits into from
Apr 1, 2024

Conversation

zhangtao07
Copy link
Collaborator

What

Why

How

Copy link

github-actions bot commented Apr 1, 2024

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

@github-actions github-actions bot added the chore label Apr 1, 2024
const resizer = context.resizer;
const frameRect = parent.getBoundingClientRect();
const rect = dom.getBoundingClientRect();
const isFlexItem = this.manager?.isFlexItem(node.id);
const isColumnFlex = String(host?.schema?.style?.flexDirection).includes(
Copy link
Collaborator

Choose a reason for hiding this comment

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

判断当前元素是否是flex(垂直排列方向)直接子元素有现成的方法:
const isFlexColumnItem = this.manager.isFlexColumnItem(context.id)。

@zhangtao07 zhangtao07 merged commit d1dd59c into baidu:master Apr 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants