mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-01 00:29:29 -04:00
Undo previous change again and document Project#remove().
This commit is contained in:
parent
d1305ff91c
commit
bd5329c537
1 changed files with 6 additions and 1 deletions
|
@ -99,10 +99,15 @@ var Project = this.Project = Base.extend(/** @lends Project# */{
|
|||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* Removes this project from the global {@see _global_#projects} list.
|
||||
*/
|
||||
remove: function() {
|
||||
if (this._scope) {
|
||||
Base.splice(this._scope.projects, null, this._index, 1);
|
||||
this._scope.remove();
|
||||
// Clear the active project reference if it was pointint to this.
|
||||
if (this._scope.project == this)
|
||||
this._scope.project = null;
|
||||
this._scope = null;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue