Fix HitResult test for new handling of tolerance.

This commit is contained in:
Jürg Lehni 2014-03-04 09:56:46 +01:00
parent 550044e476
commit cf8a668383

View file

@ -139,7 +139,9 @@ test('hitting the center of a path', function() {
test('hitting the center of a path with tolerance', function() {
var path = new Path([0, 0], [100, 100], [200, 0]);
path.closed = true;
var hitResult = paper.project.hitTest(path.position.add(1, 1), {
var offset = new Point(1, 1);
var hitResult = paper.project.hitTest(path.position.add(offset), {
tolerance: offset.length,
center: true
});