Skip to content

Commit 4ed82c2

Browse files
committed
Fix cocos2d#3405: Calling getContentSize() after setString() in CCLabelTTF deforms label
1 parent b2ce3c4 commit 4ed82c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: cocos2d/core/labelttf/CCLabelTTF.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -719,18 +719,18 @@ cc.LabelTTF = cc.Sprite.extend(/** @lends cc.LabelTTF# */{
719719
*/
720720
getContentSize: function () {
721721
if (this._needUpdateTexture)
722-
this._renderCmd._updateTTF();
722+
this._renderCmd._updateTexture();
723723
return cc.Sprite.prototype.getContentSize.call(this);
724724
},
725725

726726
_getWidth: function () {
727727
if (this._needUpdateTexture)
728-
this._renderCmd._updateTTF();
728+
this._renderCmd._updateTexture();
729729
return cc.Sprite.prototype._getWidth.call(this);
730730
},
731731
_getHeight: function () {
732732
if (this._needUpdateTexture)
733-
this._renderCmd._updateTTF();
733+
this._renderCmd._updateTexture();
734734
return cc.Sprite.prototype._getHeight.call(this);
735735
},
736736

0 commit comments

Comments
 (0)