fix label warp bug for cocos-creator/engine/issues/2151

This commit is contained in:
knoxHuang
2017-12-04 16:19:21 +08:00
parent 094ecd1986
commit 1d6bdc5c36
+3 -1
View File
@@ -296,12 +296,14 @@ var TextUtils = {
sText = text.substr(0, fuzzyLen);
}
}
if (sText.trim().length > 0) {
sText = sText.trim();
if (sText.length > 0) {
wrappedWords.push(sText);
}
text = sLine || tmpText;
allWidth = measureText(text);
}
text = text.trim();
if (text.length > 0) {
wrappedWords.push(text);
}