Add object literal constructor docs to Rectangle.

This commit is contained in:
Jonathan Puckey 2013-03-16 13:15:21 +01:00
parent c6bcd7d97a
commit 1393825bc2

View file

@ -28,6 +28,25 @@ var Rectangle = this.Rectangle = Base.extend(/** @lends Rectangle# */{
* @param {Point} point the top-left point of the rectangle
* @param {Size} size the size of the rectangle
*/
/**
* Creates a Rectangle object.
*
* @name Rectangle#initialize
* @param {Object} properties An object literal containing properties to be
* set on the rectangle.
*
* @example // Create a rectangle between {x: 20, y: 20} and {x: 80, y:80}
* var rectangle = new Rectangle({
* point: [20, 20],
* size: [60, 60]
* });
*
* @example // Create a rectangle between {x: 20, y: 20} and {x: 80, y:80}
* var rectangle = new Rectangle({
* from: [20, 20],
* to: [80, 80]
* });
*/
/**
* Creates a rectangle object.
*