Select tool chooses wrong point when zoomed in
When using the select tool on an image to select individual points to drag them around, the select tool highlights points that are not under the cursor when zoomed in. This makes selecting a point and dragging it around on a zoomed in view impossible.
After further investigation, this appears to be due to a large radius being used for each point for detecting mouse enter and leave events so that these regions overlap. As a result, if points are close together, the last point that entered the selection radius will be highlighted, which prevents points from being dragged if they are close together since the point directly under the cursor will not be selected.
This is kind of important... Is anyone looking into this?
I suspect it's to do with how paper.js is resolving the hitTest: https://github.com/jsbroks/coco-annotator/blob/c35dba220535e8552f60db310efc7e70e601d32e/client/src/components/annotator/tools/SelectTool.vue#L49
http://paperjs.org/reference/project/#hittest-point
Looks like it's accepting the first hit that isn't an 'indicator' (whatever that is).
For anyone new, I think just lowering the tolerance down resolves this issue.
hitOptions: {
segments: true,
stroke: true,
fill: false,
tolerance: 1, # change from 10 to 1
match: hit => {
return !hit.item.hasOwnProperty("indicator");
}
}