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 tiledmap order bug #5587

Conversation

sunnylanwanjun
Copy link
Contributor

@sunnylanwanjun sunnylanwanjun commented Oct 23, 2019

forum:https://forum.cocos.com/t/creator2-2-tiledmap/84837
为了保存节点上的用户组件,重刷tilemap资源时,判断是否存在同名节点,若有,则直接使用该节点,但此时zIndex有可能不对,所以这里要重新设置

@holycanvas holycanvas requested review from caryliu1999 and jareguo Oct 24, 2019
@@ -687,6 +687,7 @@ let TiledMap = cc.Class({
node.addChild(child);
}

child.zIndex = i;
Copy link
Member

@jareguo jareguo Oct 24, 2019

Choose a reason for hiding this comment

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

这里确定不是更新 siblingIndex?

Copy link
Contributor Author

@sunnylanwanjun sunnylanwanjun Oct 28, 2019

Choose a reason for hiding this comment

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

哦,还有这个接口。。。。那肯定是setSiblingIndex了

@holycanvas holycanvas merged commit 9273c7f into cocos:v2.2.1-release Oct 28, 2019
1 check passed
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.

None yet

3 participants