Skip to content

Commit

Permalink
fixing the code example for extensability
Browse files Browse the repository at this point in the history
  • Loading branch information
tjvantoll committed Feb 25, 2012
1 parent 36a17f0 commit 447a9cb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ clearCycle - Clear the interval created by cycle.

The following technique can be used to extend PictureCube. This example creates an AwesomeCube that inherits the base methods from PictureCube's prototype.

AwesomeCube = function(node, images) {
PictureCube.apply(this, [node, images]);
};
AwesomeCube.prototype = new PictureCube();
AwesomeCube.prototype.newMethod = function() {
//this.cube, this.images, this.goto, this.cycle
//and this.clearCycle are available to the new
//function.
};
AwesomeCube = function(node, images) {
PictureCube.apply(this, [node, images]);
};
AwesomeCube.prototype = new PictureCube();
AwesomeCube.prototype.newMethod = function() {
//this.cube, this.images, this.goto, this.cycle
//and this.clearCycle are available to the new
//function.
};

## Limitations

Expand Down

0 comments on commit 447a9cb

Please sign in to comment.