mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Merge pull request #308 from ojj11/isEmptyFix
Override default isEmpty method for Shape
This commit is contained in:
commit
bc85dd1dc3
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue