Fix a newly introduced bug in #contains().

This commit is contained in:
Jürg Lehni 2011-07-09 10:17:06 +02:00
parent 8a6d53766e
commit 17b412ce6f

View file

@ -319,7 +319,7 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
crossings = 0;
for (var i = 0, l = roots != Infinity && roots.length; i < l; i++) {
var t = roots[i];
if (t >= 0 && t < 1 && Curve.evaluate(vals, t, 0).y > point.x) {
if (t >= 0 && t < 1 && Curve.evaluate(vals, t, 0).x > point.x) {
// If we're close to 0 and are not changing y-direction from the
// previous curve, do not count this root, as we're merely
// touching a tip. Passing 1 for Curve.evaluate()'s type means