mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Add some explaining comments to dictionary code.
This commit is contained in:
parent
15554b8bf2
commit
ee73b4e15b
1 changed files with 4 additions and 0 deletions
|
@ -260,6 +260,10 @@ this.Base = Base.inject(/** @lends Base# */{
|
|||
definitions: {},
|
||||
references: {},
|
||||
add: function(item, create) {
|
||||
// See if we have reference entry with the given id
|
||||
// already. If not, call create on the item to allow it
|
||||
// to create the definition, then store the reference
|
||||
// to it and return it.
|
||||
var id = '#' + item._id,
|
||||
ref = this.references[id];
|
||||
if (!ref) {
|
||||
|
|
Loading…
Reference in a new issue