added getSize() method to Stage, Rect, and Image. Also updated unit tests

This commit is contained in:
Eric Rowell
2012-03-31 00:08:50 -07:00
parent 69c27de7df
commit 9994e8a37e
8 changed files with 91 additions and 9 deletions

View File

@@ -120,6 +120,15 @@ Kinetic.Stage.prototype = {
this.backstageLayer.getCanvas().width = width;
this.backstageLayer.getCanvas().height = height;
},
/**
* return stage size
*/
getSize: function() {
return {
width: this.width,
height: this.height
};
},
/**
* clear all layers
*/