Skip to content

Commit 8cdd325

Browse files
author
jianglong0156
committed
fix labelAtlas recover old label
1 parent 9be2ae6 commit 8cdd325

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: cocos2d/labels/CCLabelAtlas.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,10 @@ cc.LabelAtlas = cc.AtlasNode.extend(/** @lends cc.LabelAtlas# */{
143143
var locLoaded = texture.isLoaded();
144144
this._textureLoaded = locLoaded;
145145
if (!locLoaded) {
146+
this._string = label;
146147
texture.addEventListener("load", function (sender) {
147148
this.initWithTexture(texture, width, height, label.length);
148-
this.string = label;
149+
this.string = this._string;
149150
this.setColor(this._renderCmd._displayedColor);
150151
this.dispatchEvent("load");
151152
}, this);

0 commit comments

Comments
 (0)