informatics-isi-edu / openseadragon-viewer

2D viewer with openseadragon
Apache License 2.0
5 stars 2 forks source link

Make the annotation lines easier to click #34

Closed rastogi-bhavya closed 3 years ago

rastogi-bhavya commented 4 years ago

Add invisible border or increase the onclick area for these lines so that they are easier to click by the user

RFSH commented 3 years ago

@rastogi-bhavya Please add a comment and summarize the solution that you came up with and why we decided not to go with that solution.

Please mention where in the code you were planning to change and also explain the issue that you faced while doing that (I remember you mentioned some issue that you didn't know how to solve)

RFSH commented 3 years ago

The solution that we found was adding a thicker invisible line below all the lines that are drawn in the SVG annotations. And then attach the click handlers to that thicker invisible line. To do this, after reading the annotations, we have to duplicate them and set the thickness for the invisible SVG elements to be bigger than the original.

After discussing this further, this seemed like an unnecessary improvement given that the solution wasn't simple. This solution could also lead to more problems as it could make the annotations collide with each other and that could mess with the click handler events. So I'm going to close this issue.