The following code in the paper.js structure performs a hit at the point of coordinate of mouse coordination. I want to do this that I have to do this exam within the given radius of event.point (), but I have not found any way yet. Any thoughts? UPDATE I think the way I was setting the option should be ignored. The following code works: It seems that due to a bug the tolerance option is not read. You can manually change the tolerance by modifying the line 3631 (at night). For example, if you want a test radius of 200 points: to: Function OnMouseUp (Events) {var hitOptions = {Stroke: Wrong, Fill: Correct, Tolerance: 2}; Var hitResult = project.hitTest (event.point, hitOptions); }
var hitOptions = {fill: true, stroke: true, Segment: true, tolerance: 200}; Var hitResult = project.hitTest (event.point, hitOptions); Alert (hitResult);
Tolerance: paper.project.options.hitTolerance || 2
Tolerance: paper.project.options.hitTolerance || 200
No comments:
Post a Comment