Merge pull request #2158 from knoxHuang/v1.7-release

fix label warp bug for cocos-creator/engine/issues/2151
This commit is contained in:
pandamicro
2017-12-04 16:37:04 +08:00
committed by GitHub
+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);
}