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

Remove reorder logic during walk #4926

Merged
merged 3 commits into from
Jul 20, 2019
Merged

Conversation

pandamicro
Copy link
Contributor

Re: cocos-creator/2d-tasks#1145

let node = resortNodeList[i];
let children = node.children;
for (let i = 0; i < children.length; ++i) {
let node = children[i];
Copy link
Contributor

Choose a reason for hiding this comment

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

这里之前的写法是不是不好,node 已经作为传入值,这里又声明了一个 let node = children[i]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

哦对,要用不同的属性名

@@ -78,6 +79,7 @@ export class UIComponent extends Component {
public onEnable () {
this._lastParent = this.node.parent;
this._updateVisibility();
this._sortSiblings();
Copy link
Contributor

Choose a reason for hiding this comment

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

这句要放到 uicomp 赋值那句之后

@pandamicro pandamicro merged commit b1ec962 into cocos:3d-v1.0.0 Jul 20, 2019
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.

2 participants