finished base constructor examples for core shape docs

This commit is contained in:
Eric Rowell
2013-05-17 20:56:24 -07:00
parent 375abc40fb
commit 993ffd7b0e
9 changed files with 67 additions and 10 deletions

View File

@@ -800,16 +800,18 @@
}
},
/**
* clone node. Returns a new Node instance with identical attributes
* clone node. Returns a new Node instance with identical attributes. You can also override
* the node properties with an object literal, enabling you to use an existing node as a template
* for another node
* @method
* @memberof Kinetic.Node.prototype
* @param {Object} attrs override attrs
* @example
* // clone a rectangle<br>
* var rectClone = rect.clone();<br><br>
* // simple clone<br>
* var clone = node.clone();<br><br>
*
* // clone a rectangle, but override the x position<br>
* var rectClone = rect.clone({<br>
* // clone a node and override the x position<br>
* var clone = rect.clone({<br>
* x: 5<br>
* });
*/