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

UITransform priority change #8435

Merged
merged 5 commits into from
Apr 15, 2021
Merged

UITransform priority change #8435

merged 5 commits into from
Apr 15, 2021

Conversation

LinYunMo
Copy link
Contributor

@LinYunMo LinYunMo commented Apr 9, 2021

@LinYunMo LinYunMo requested a review from SantyWang April 9, 2021 09:20
@@ -213,8 +213,7 @@ export class UITransform extends Component {
}

this._priority = value;
this._checkAndSortSiblings();
this.node.parent!._updateSiblingIndex();
this._priorityDirty = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

If we remove this property, why add dirty to it ? Is there any problem ?

// 这个 dirty 是由子节点带来 dirty,其实是指的是子节点要不要重排 // 如果子节点要重排就在这里排
UITransform._sortChildrenSibling(node);
node._updateSiblingIndex();
node.emit('SiblingChange');
Copy link
Contributor

Choose a reason for hiding this comment

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

这里就不是 sibling change 了,而是 children change

@SantyWang SantyWang merged commit b89c07f into cocos:v3.1 Apr 15, 2021
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.

3 participants