Skip to content

Commit 0155c1e

Browse files
committed
Repair labelTTF circulation problems
1 parent 134caf5 commit 0155c1e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cocos2d/core/labelttf/CCLabelTTF.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,10 @@ cc.LabelTTF = cc.Sprite.extend(/** @lends cc.LabelTTF# */{
844844
}
845845

846846
fuzzyLen -= pushNum;
847+
if(fuzzyLen === 0){
848+
fuzzyLen = 1;
849+
sLine = sLine.substr(1);
850+
}
847851

848852
var sText = text.substr(0, fuzzyLen);
849853

0 commit comments

Comments
 (0)