[html5] TextView height fix

This commit is contained in:
2015-04-28 00:20:54 +03:00
parent 1baa673f8a
commit d0fc36c097

View File

@@ -148,7 +148,11 @@ class TextView extends SpriteView implements ITextView<Sprite, TextField> {
if (t != null) textField.text = t;
textField.setTextFormat(textFormat);
if (contentSize && !Std.is(skin, ISize)) {
#if html5 textField.height = textField.textHeight; #end
#if html5
var h = textField.textHeight;
if (h > textFormat.size * 1.5) h = h / 2;
textField.height = h;
#end
width = textField.width + paddings * 2;
height = textField.height + paddings * 2;
textField.x = paddings;