mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-05 20:32:00 -05:00
Add TODOs about not returning -1 for undefined.
This commit is contained in:
parent
4bfc56bb6d
commit
6b6f27cb6e
2 changed files with 2 additions and 0 deletions
|
@ -252,6 +252,7 @@ var Item = this.Item = Base.extend({
|
|||
// TODO: Relying on indexOf() here is slow, especially since it is
|
||||
// used for getPrevious/NextSibling().
|
||||
// We need linked lists instead.
|
||||
// TODO: Return null instead of -1?
|
||||
return this.parent ? this.parent.children.indexOf(this) : -1;
|
||||
},
|
||||
|
||||
|
|
|
@ -98,6 +98,7 @@ var Segment = this.Segment = Base.extend({
|
|||
|
||||
getIndex: function() {
|
||||
// TODO: Cache and update indices instead of searching?
|
||||
// TODO: Return null instead of -1?
|
||||
return this._path ? this._path._segments.indexOf(this) : -1;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue