File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,11 @@ cc.LabelBMFont = cc.Node.extend(/** @lends cc.LabelBMFont# */{
114114 } ,
115115
116116 _setString : function ( newString , needUpdateLabel ) {
117- this . _initialString = newString ;
118- this . _string = newString ;
117+ if ( ! needUpdateLabel ) {
118+ this . _string = newString ;
119+ } else {
120+ this . _initialString = newString ;
121+ }
119122
120123 var locChildren = this . _children ;
121124 if ( locChildren ) {
@@ -561,7 +564,8 @@ cc.LabelBMFont = cc.Node.extend(/** @lends cc.LabelBMFont# */{
561564 */
562565 updateLabel : function ( ) {
563566 var self = this ;
564- self . _string = self . _initialString ;
567+ self . string = self . _initialString ;
568+
565569 var i , j , characterSprite ;
566570 // process string
567571 // Step 1: Make multiline
You can’t perform that action at this time.
0 commit comments