mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-08-01 16:49:15 -04:00
We can directly access Item#_id.
No need to call Item#getId() internally.
This commit is contained in:
parent
cb8c94ef7e
commit
cadc2e78ca
3 changed files with 19 additions and 22 deletions
src/project
|
@ -164,10 +164,10 @@ var Project = this.Project = PaperScopeItem.extend(/** @lends Project# */{
|
|||
_updateSelection: function(item) {
|
||||
if (item._selected) {
|
||||
this._selectedItemCount++;
|
||||
this._selectedItems[item.getId()] = item;
|
||||
this._selectedItems[item._id] = item;
|
||||
} else {
|
||||
this._selectedItemCount--;
|
||||
delete this._selectedItems[item.getId()];
|
||||
delete this._selectedItems[item._id];
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue