Merge pull request #308 from ojj11/isEmptyFix

Override default isEmpty method for Shape
This commit is contained in:
Jürg Lehni 2013-10-14 00:11:48 -07:00
commit bc85dd1dc3

View file

@ -21,6 +21,16 @@ var Shape = Item.extend(/** @lends Shape# */{
_class: 'Shape',
_transformContent: false,
/**
* Assumed that shape can never be empty.
* Fixes (new Group([new Shape.Rectangle(...)])).bounds throwing ReferenceError.
*
* @returns bool
*/
isEmpty: function() {
return false;
},
initialize: function Shape(type, point, size, props) {
this._initialize(props, point);
this._type = type;