Devine Lu Linvega a2fed4c21e Added icons
2017-01-12 15:37:22 -07:00

15 lines
381 B
JavaScript

function Rect(rect_str)
{
Unit.call(this);
this.example = "200x300";
this.rect_str = rect_str;
this.width = rect_str ? parseFloat(this.rect_str.split("x")[0]) : 0;
this.height = rect_str ? parseFloat(this.rect_str.split("x")[1]) : 0;
this.render = function()
{
return (isNaN(this.width) ? 0 : this.width)+"x"+(isNaN(this.height) ? 0 : this.height);
}
}