mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 00:22:43 +08:00
Merge pull request #486 from zilongshanren/fix-webgl-label
fix webgl label rendering position
This commit is contained in:
@@ -375,7 +375,7 @@ _ccsg.Node.RenderCmd.prototype = {
|
||||
|
||||
if (transformDirty)
|
||||
//update the transform
|
||||
this.transform(parentCmd, true);
|
||||
this.transform(parentCmd);
|
||||
},
|
||||
|
||||
visitChildren: function(){
|
||||
|
||||
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user