Override default isEmpty method for Shape

Fixes (new Group([new Shape.Rectangle(...)])).bounds throwing ReferenceError when using Item's isEmpty
This commit is contained in:
Oliver Jones 2013-10-12 19:28:45 +01:00
parent dfa1687a90
commit df7f1fe874

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;