mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
fix label display error for fireball/issues/6894
This commit is contained in:
@@ -288,8 +288,8 @@
|
||||
}
|
||||
canvasSizeY = this._splitedStrings.length * this._getLineHeight();
|
||||
|
||||
this._canvasSize.width = parseFloat(canvasSizeX.toFixed(2)) + 2 * this._getMargin();
|
||||
this._canvasSize.height = parseFloat(canvasSizeY.toFixed(2));
|
||||
this._canvasSize.width = Math.round(canvasSizeX.toFixed(2)) + 2 * this._getMargin();
|
||||
this._canvasSize.height = Math.round(canvasSizeY.toFixed(2));
|
||||
if(node._isItalic) {
|
||||
//0.0174532925 = 3.141592653 / 180
|
||||
this._canvasSize.width += node._drawFontsize * Math.tan(12 * 0.0174532925);
|
||||
|
||||
Reference in New Issue
Block a user