mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
added getSize() method to Stage, Rect, and Image. Also updated unit tests
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user