updated shape.getContext() documentation

This commit is contained in:
Eric Rowell 2012-03-11 16:05:47 -07:00
parent 5aee56ab5e
commit 6093c7ca73
2 changed files with 12 additions and 3 deletions

View File

@ -1540,7 +1540,11 @@ Kinetic.Shape = function(config) {
*/
Kinetic.Shape.prototype = {
/**
* get temporary shape layer context
* get layer context that the shape is being drawn. When
* the shape is being rendered, .getContext() returns the context of the
* user created layer that contains the shape. When the event detection
* engine is determining whether or not an event has occured on that shape,
* .getContext() returns the context of the invisible backstage layer.
*/
getContext: function() {
return this.tempLayer.getContext();
@ -1672,6 +1676,7 @@ Kinetic.Shape.prototype = {
};
// extend Node
Kinetic.GlobalObject.extend(Kinetic.Shape, Kinetic.Node);
///////////////////////////////////////////////////////////////////////
// Rect
///////////////////////////////////////////////////////////////////////

View File

@ -31,7 +31,11 @@ Kinetic.Shape = function(config) {
*/
Kinetic.Shape.prototype = {
/**
* get temporary shape layer context
* get layer context that the shape is being drawn. When
* the shape is being rendered, .getContext() returns the context of the
* user created layer that contains the shape. When the event detection
* engine is determining whether or not an event has occured on that shape,
* .getContext() returns the context of the invisible backstage layer.
*/
getContext: function() {
return this.tempLayer.getContext();
@ -162,4 +166,4 @@ Kinetic.Shape.prototype = {
}
};
// extend Node
Kinetic.GlobalObject.extend(Kinetic.Shape, Kinetic.Node);
Kinetic.GlobalObject.extend(Kinetic.Shape, Kinetic.Node);