Merge pull request #486 from zilongshanren/fix-webgl-label

fix webgl label rendering position
This commit is contained in:
pandamicro
2016-03-17 11:23:08 +08:00
2 changed files with 4 additions and 4 deletions
@@ -375,7 +375,7 @@ _ccsg.Node.RenderCmd.prototype = {
if (transformDirty)
//update the transform
this.transform(parentCmd, true);
this.transform(parentCmd);
},
visitChildren: function(){
+3 -3
View File
@@ -449,19 +449,19 @@ _ccsg.Label = _ccsg.Node.extend({
getContentSize: function() {
if (!CC_EDITOR && !cc.sizeEqualToSize(this._contentSize, this._renderCmd._realRenderingSize)) {
this._renderCmd.setDirtyFlag(_ccsg.Node._dirtyFlags.textDirty);
this._updateLabel();
}
return _ccsg.Node.prototype.getContentSize.call(this);
},
_getWidth: function () {
if (!CC_EDITOR && !cc.sizeEqualToSize(this._contentSize, this._renderCmd._realRenderingSize)) {
this._renderCmd.setDirtyFlag(_ccsg.Node._dirtyFlags.textDirty);
this._updateLabel();
}
return _ccsg.Node.prototype._getWidth.call(this);
},
_getHeight: function () {
if (!CC_EDITOR && !cc.sizeEqualToSize(this._contentSize, this._renderCmd._realRenderingSize)) {
this._renderCmd.setDirtyFlag(_ccsg.Node._dirtyFlags.textDirty);
this._updateLabel();
}
return _ccsg.Node.prototype._getHeight.call(this);
},