CanvasRect.js revision 09688ec5ffb8b9cf9883a770e2f9ebd60b28888d
/**
* Draws rectangles
*/
var CanvasRect = function()
{
CanvasRect.superclass.constructor.apply(this, arguments);
};
CanvasRect.NAME = "canvasRect";
Y.extend(CanvasRect, Y.CanvasShape, {
/**
* Indicates the type of shape
*
* @property _type
* @readOnly
* @type String
*/
_type: "rect",
/**
* @private
*/
_draw: function()
{
this.clear();
var x = this.get("x"),
y = this.get("y"),
w = this.get("width"),
h = this.get("height");
this.drawRect(x, y, w, h);
this._paint();
}
});
CanvasRect.ATTRS = Y.CanvasShape.ATTRS;
Y.CanvasRect = CanvasRect;