Some CurveLocation cleanup.

- Remove UID as there is no need anymore
- Rename some private properties
This commit is contained in:
Jürg Lehni 2016-02-10 12:36:39 +01:00
parent 0ae232e4ab
commit 00d2e2a5bb
2 changed files with 6 additions and 10 deletions

View file

@ -51,17 +51,13 @@ var CurveLocation = Base.extend(/** @lends CurveLocation# */{
curve = next;
}
}
// Define this CurveLocation's unique id.
// NOTE: We do not use the same pool as the rest of the library here,
// since this is only required to be unique at runtime among other
// CurveLocation objects.
this._id = UID.get(CurveLocation);
this._setCurve(curve);
this._time = time;
this._point = point || curve.getPointAtTime(time);
this._overlap = _overlap;
this._distance = _distance;
this._intersection = this._next = this._prev = null;
// Properties related to linked intersection locations
this._intersection = this._next = this._previous = null;
},
_setCurve: function(curve) {

View file

@ -206,7 +206,7 @@ PathItem.inject(new function() {
while (prev) {
if (prev === to)
return;
prev = prev._prev;
prev = prev._previous;
}
// Now walk to the end of the existing chain to find an empty spot, but
// stop if we find `to`, to avoid adding it again.
@ -215,10 +215,10 @@ PathItem.inject(new function() {
// If we're reached the end of the list, we can add it.
if (!from._next) {
// Go back to beginning of the other chain, and link the two up.
while (to._prev)
to = to._prev;
while (to._previous)
to = to._previous;
from._next = to;
to._prev = from;
to._previous = from;
}
}