kingsdigitallab / crossreads

Palaeographical environment for CROSSREADS project
1 stars 0 forks source link

Hide annotation boxes for visibility? #54

Closed simonastoyanova closed 4 months ago

simonastoyanova commented 5 months ago

I'm starting to come across more complex cases of overlapping annotations, e.g. here 'equit' :

Screenshot 2024-04-09 at 22 32 27

Would it be feasible to add a button/toggle to hide all annotations when the overlap makes it impossible to see clearly the shape of a character? The annotation boxes could be added one at a time on a plain field; when the complex section of text is done, we visualise all boxes again with the toggle.

Not sure how possible or difficult this would be, so let me know what you think, @geoffroy-noel-ddh.

geoffroy-noel-ddh commented 5 months ago

A toggle should be feasible, I'll try this week.

simonastoyanova commented 5 months ago

Thank you! Let me know if you need me to test specific behaviour or to step away from the annotator while you work on this.

geoffroy-noel-ddh commented 5 months ago

You can always work while I'm doing new development. That's never getting in my way. However things might break from time to time but that should be quickly addressed as you report bugs.

geoffroy-noel-ddh commented 5 months ago

Do you have one or two links to share where the annotations are quite crowded?

simonastoyanova commented 5 months ago

Yes, here is ISic000098, especially the last two lines: https://kingsdigitallab.github.io/crossreads/annotator.html?obj=http://sicily.classics.ox.ac.uk/inscription/ISic000098&img=ISic000098.jpg&scr=latin-1

ISic000096, moslty first and last line: https://kingsdigitallab.github.io/crossreads/annotator.html?obj=http://sicily.classics.ox.ac.uk/inscription/ISic000096&img=ISic000096.jpg&scr=latin-1

ISic000163, right hand side: https://kingsdigitallab.github.io/crossreads/annotator.html?obj=http://sicily.classics.ox.ac.uk/inscription/ISic000163&img=ISic000163.jpg&scr=latin-1

I haven't annotated ISic000099 yet but the script is very tight and this will come up again.

geoffroy-noel-ddh commented 5 months ago

I looked into this yesterday and I don't see anything in Annotorious API supporting it. I'll see if that's feasible by bypassing the library with CSS/JS or directly interacting with OpenSeaDragon's API.

What I had in mind was an uncluttered mode where only the currently selected box is visible in the image viewer. Hiding unselected annotations isn't difficult. But making them unresponsive to click is. Without disabling click on other annotations, user interactions might be quite confusing. Although we could try to see how useful that is, if at all.

geoffroy-noel-ddh commented 5 months ago

@simonastoyanova I've added a visibility checkbox.

image

Unticked: nothing changes in the behaviour of the annotating interface. That's the default mode.

Ticked: all annotations except the currently selected one are hidden. A click anywhere outside the selected annotation will deselect it. Creating new annotation still works. One minor UI glitch is that the mouse cursor will still show a hand when hovering hidden annotations but this can be ignored; they won't respond to click or drag. Unfortunately this isn't feasible to fix that easily.

Please let me know how that works for you.

simonastoyanova commented 5 months ago

@geoffroy-noel-ddh Brilliant, thank you! The small glitch doesn't bother me at all, plus it makes sense that the hidden boxes don't respond to click or drag - I only needed them to be hidden, not actionable. I will report if I notice anything weird while annotating.

simonastoyanova commented 4 months ago

@geoffroy-noel-ddh We can close this, it works well for me and I haven't noticed any bugs.

geoffroy-noel-ddh commented 4 months ago

Cool, thanks!