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 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;

This comment has been minimized.

Copy link
@jareguo

jareguo Oct 24, 2019

Contributor

这里确定不是更新 siblingIndex?

This comment has been minimized.

Copy link
@sunnylanwanjun

sunnylanwanjun Oct 28, 2019

Author Contributor

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

@holycanvas holycanvas merged commit 9273c7f into cocos-creator:v2.2.1-release Oct 28, 2019
1 check passed
1 check passed
ci/circleci: test Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.