From f58baea01969185401ba6100b2b548cd6c2e0562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alicia=20Boya=20Garc=C3=ADa?= Date: Tue, 8 Nov 2016 16:43:21 +0100 Subject: [PATCH] Fix #3405: Calling getContentSize() after setString() in CCLabelTTF deforms label --- cocos2d/core/labelttf/CCLabelTTF.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos2d/core/labelttf/CCLabelTTF.js b/cocos2d/core/labelttf/CCLabelTTF.js index 42803f2a2a..512257cc04 100644 --- a/cocos2d/core/labelttf/CCLabelTTF.js +++ b/cocos2d/core/labelttf/CCLabelTTF.js @@ -805,18 +805,18 @@ cc.LabelTTF = cc.Sprite.extend(/** @lends cc.LabelTTF# */{ */ getContentSize: function () { if (this._needUpdateTexture) - this._renderCmd._updateTTF(); + this._renderCmd._updateTexture(); return cc.size(this._contentSize); }, _getWidth: function () { if (this._needUpdateTexture) - this._renderCmd._updateTTF(); + this._renderCmd._updateTexture(); return this._contentSize.width; }, _getHeight: function () { if (this._needUpdateTexture) - this._renderCmd._updateTTF(); + this._renderCmd._updateTexture(); return this._contentSize.height; },