mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-03-14 00:39:57 -04:00
Fix HitResult test for new handling of tolerance.
This commit is contained in:
parent
550044e476
commit
cf8a668383
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue