Resize icons on scale.

This commit is contained in:
Paulo Veiga
2011-09-02 20:05:51 -03:00
parent 001ff2e371
commit b1b0ee0de8
4 changed files with 41 additions and 6 deletions

View File

@@ -31,9 +31,8 @@ web2d.Text = new Class({
this._peer.setText(text);
},
setTextAlignment : function(align)
{
$assert(align,"align can not be null");
setTextAlignment : function(align) {
$assert(align, "align can not be null");
this._peer.setTextAlignment(align);
},
@@ -87,5 +86,10 @@ web2d.Text = new Class({
getHeight : function() {
return parseInt(this._peer.getHeight());
},
getFontHeight : function() {
var lines = this._peer.getText().split('\n').length;
return Math.round(this.getHeight() / lines);
}
});