mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
simplify code
This commit is contained in:
@@ -248,7 +248,8 @@ var RichText = cc.Class({
|
||||
},
|
||||
|
||||
_onTTFLoaded: function () {
|
||||
if(!this._getFontRawUrl()) return;
|
||||
var rawUrl = this._getFontRawUrl();
|
||||
if(!rawUrl) return;
|
||||
|
||||
var self = this;
|
||||
|
||||
@@ -257,7 +258,7 @@ var RichText = cc.Class({
|
||||
self._updateRichText();
|
||||
};
|
||||
|
||||
cc.CustomFontLoader.loadTTF(this._getFontRawUrl(), callback);
|
||||
cc.CustomFontLoader.loadTTF(rawUrl, callback);
|
||||
},
|
||||
|
||||
_measureText: function (styleIndex, string) {
|
||||
|
||||
Reference in New Issue
Block a user