Skip to content

Commit

Permalink
Fix the problem that colorDirty of bmfont on web platform doesn't wor…
Browse files Browse the repository at this point in the history
…k. (#17037)

Co-authored-by: qiuguohua <guohua.qiu@cocos.com>
  • Loading branch information
qiuguohua and qiuguohua committed May 23, 2024
1 parent bfeedd3 commit 580ffc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cocos/2d/assembler/label/bmfontUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const bmfontUtils = {
// But this function is not called when just modifying the opacity.
// So the value of '_comp.node._uiProps.colorDirty' does not change.
// And _uiProps.colorDirty is synchronized with renderEntity.colorDirty.
if (_comp.renderEntity.colorDirty || isResized) {
if (JSB && (_comp.renderEntity.colorDirty || isResized)) {
this.updateColor(comp); // dirty need
_comp.node._uiProps.colorDirty = false;
}
Expand Down

0 comments on commit 580ffc3

Please sign in to comment.