mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Move around Item#isInserted() code so it shows up in the Tests group section in the docs.
This commit is contained in:
parent
12d7756892
commit
af84a52af8
1 changed files with 10 additions and 10 deletions
|
@ -1444,16 +1444,6 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
||||||
return this._index;
|
return this._index;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks whether the item and all its parents are inserted into the DOM or
|
|
||||||
* not.
|
|
||||||
*
|
|
||||||
* @return {Boolean} {@true if the item is inserted into the DOM}
|
|
||||||
*/
|
|
||||||
isInserted: function() {
|
|
||||||
return this._parent ? this._parent.isInserted() : false;
|
|
||||||
},
|
|
||||||
|
|
||||||
equals: function(item) {
|
equals: function(item) {
|
||||||
// Note: We do not compare name and selected state.
|
// Note: We do not compare name and selected state.
|
||||||
return item === this || item && this._class === item._class
|
return item === this || item && this._class === item._class
|
||||||
|
@ -2330,6 +2320,16 @@ var Item = Base.extend(Callback, /** @lends Item# */{
|
||||||
return !this._children || this._children.length === 0;
|
return !this._children || this._children.length === 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks whether the item and all its parents are inserted into the DOM or
|
||||||
|
* not.
|
||||||
|
*
|
||||||
|
* @return {Boolean} {@true if the item is inserted into the DOM}
|
||||||
|
*/
|
||||||
|
isInserted: function() {
|
||||||
|
return this._parent ? this._parent.isInserted() : false;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether the item is editable.
|
* Checks whether the item is editable.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue