Skip to content

Commit 0f1bf6c

Browse files
committed
Fixed name error
1 parent e5a4aba commit 0f1bf6c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cocos2d/core/labelttf/CCLabelTTF.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ cc.LabelTTF = cc.Sprite.extend(/** @lends cc.LabelTTF# */{
217217
this._setColorsString();
218218
},
219219

220-
getLineHiehgt: function(){
220+
getLineHeight: function(){
221221
return this._lineHeight || this._fontClientHeight;
222222
},
223223

@@ -764,7 +764,7 @@ cc.LabelTTF = cc.Sprite.extend(/** @lends cc.LabelTTF# */{
764764
var locContentWidth = this._contentSize.width - locStrokeShadowOffsetX;
765765

766766
//lineHiehgt
767-
var lineHeight = this.getLineHiehgt();
767+
var lineHeight = this.getLineHeight();
768768
var transformTop = (lineHeight - this._fontClientHeight) / 2;
769769

770770
if (locHAlignment === cc.TEXT_ALIGNMENT_RIGHT)
@@ -938,9 +938,9 @@ cc.LabelTTF = cc.Sprite.extend(/** @lends cc.LabelTTF# */{
938938
} else {
939939
if (this._dimensions.height === 0) {
940940
if (this._isMultiLine)
941-
locSize = cc.size(0 | (locDimensionsWidth + locStrokeShadowOffsetX), 0 | ((this.getLineHiehgt() * this._strings.length) + locStrokeShadowOffsetY));
941+
locSize = cc.size(0 | (locDimensionsWidth + locStrokeShadowOffsetX), 0 | ((this.getLineHeight() * this._strings.length) + locStrokeShadowOffsetY));
942942
else
943-
locSize = cc.size(0 | (locDimensionsWidth + locStrokeShadowOffsetX), 0 | (this.getLineHiehgt() + locStrokeShadowOffsetY));
943+
locSize = cc.size(0 | (locDimensionsWidth + locStrokeShadowOffsetX), 0 | (this.getLineHeight() + locStrokeShadowOffsetY));
944944
} else {
945945
//dimension is already set, contentSize must be same as dimension
946946
locSize = cc.size(0 | (locDimensionsWidth + locStrokeShadowOffsetX), 0 | (this._dimensions.height + locStrokeShadowOffsetY));

0 commit comments

Comments
 (0)