mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Move Item#isEmpty() out of bounds scope and define documentation for it.
This commit is contained in:
parent
7622493d2e
commit
9a8dddd7df
1 changed files with 12 additions and 4 deletions
|
@ -547,6 +547,18 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
|
|||
// Use Matrix#initialize to easily copy over values.
|
||||
this._matrix.initialize(matrix);
|
||||
this._changed(/*#=*/ Change.GEOMETRY);
|
||||
},
|
||||
|
||||
/**
|
||||
* Specifies wether the item has any content or not. The meaning of what
|
||||
* content is differs from type to type. For example, a {@link Group} with
|
||||
* no children, a {@link TextItem} with no text content and a {@link Path}
|
||||
* with no segments all are considered empty.
|
||||
*
|
||||
* @type Boolean
|
||||
*/
|
||||
isEmpty: function() {
|
||||
return true;
|
||||
}
|
||||
}, Base.each(['getBounds', 'getStrokeBounds', 'getHandleBounds', 'getRoughBounds'],
|
||||
function(name) {
|
||||
|
@ -680,10 +692,6 @@ function(name) {
|
|||
return Rectangle.create(x1, y1, x2 - x1, y2 - y1);
|
||||
},
|
||||
|
||||
isEmpty: function() {
|
||||
return true;
|
||||
},
|
||||
|
||||
setBounds: function(rect) {
|
||||
rect = Rectangle.read(arguments);
|
||||
var bounds = this.getBounds(),
|
||||
|
|
Loading…
Reference in a new issue