Item docs: improve #scale examples.

This commit is contained in:
Jonathan Puckey 2011-06-02 12:59:30 +02:00
parent a32930287a
commit 371428b9ee

View file

@ -937,6 +937,7 @@ var Item = this.Item = Base.extend({
* *
* // Create a circle at position { x: 10, y: 10 } * // Create a circle at position { x: 10, y: 10 }
* var circle = new Path.Circle(new Point(10, 10), 10); * var circle = new Path.Circle(new Point(10, 10), 10);
* circle.fillColor = 'black';
* console.log(circle.bounds.width); // 20 * console.log(circle.bounds.width); // 20
* *
* // Scale the path by 200% from its center point * // Scale the path by 200% from its center point
@ -949,6 +950,7 @@ var Item = this.Item = Base.extend({
* *
* // Create a circle at position { x: 10, y: 10 } * // Create a circle at position { x: 10, y: 10 }
* var circle = new Path.Circle(new Point(10, 10), 10); * var circle = new Path.Circle(new Point(10, 10), 10);
* circle.fillColor = 'black';
* *
* // Scale the path 200% from its bottom left corner * // Scale the path 200% from its bottom left corner
* circle.scale(2, circle.bounds.bottomLeft); * circle.scale(2, circle.bounds.bottomLeft);