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

Optimize the initialization of dynamic label creation. #6173

Merged
merged 1 commit into from Feb 19, 2020

Conversation

caryliu1999
Copy link
Contributor

@caryliu1999 caryliu1999 commented Feb 15, 2020

Changes:
优化动态创建Label节点时的初始化过程,font, cacheMode的设置在未激活的情况下不做立即更新。

@holycanvas holycanvas requested a review from 2youyou2 Feb 19, 2020
@@ -389,9 +389,7 @@ let Label = cc.Class({
cc.warnID(4000);
}

this._resetAssembler();
Copy link
Contributor

@holycanvas holycanvas Feb 19, 2020

Choose a reason for hiding this comment

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

调用顺序重要么,和_forceUpdateRenderData里的调用顺序不一致

Copy link
Contributor

@holycanvas holycanvas Feb 19, 2020

Choose a reason for hiding this comment

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

_resetAssembler 在 applyFontTexture 就行

@holycanvas holycanvas merged commit 4e6b17f into cocos:v2.3.1 Feb 19, 2020
1 check passed
@caryliu1999 caryliu1999 deleted the v2.3.1-fix-dynamic-label branch Jun 22, 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.

None yet

3 participants