annotorious / annotorious-openseadragon

An OpenSeadragon plugin for annotating high-res zoomable images
https://annotorious.github.io
BSD 3-Clause "New" or "Revised" License
121 stars 43 forks source link

Polygon annotation getting stuck on startSelection event #178

Open raulgabor opened 1 year ago

raulgabor commented 1 year ago

Hi,

I am using Annotorious with OSD in an Angular project and I've stumbled upon an issue regarding the polygon annotation getting stuck on the startSelection event. The best way to reproduce it is on the plugin's getting started page. Selecting the polygon annotation from the button, you draw the first line of the annotation and while holding the click you return to the starting point of the annotation so it looks like a small annotation, almost like a point (see image and gif below). This would make the plugin unresponsive and you can't draw new annotations until you refresh the page. This issue doesn't seem to be on the standard version of the plugin.

screen-recorder-tue-jul-25-2023-18-32-57

image Through debugging, I saw that the startSelection event is triggered and it gets stuck to it, createSelection or any other event not being triggered anymore.

On a similar fashion, I have custom buttons for the annotation types (again, this can be reproduced on the plugin's page) and an another scenario where it gets stuck in the startSelection event goes like this: I select the polygon annotation, I start drawing it, and before to double click in order for the widget to appear, I deselect the annotation button and I click on another annotation button, the plugin being again unresponsive. This happens even if I don't deselect the current annotation button first but rather select other annotation button. (see gifs below) These issues don't seem to be on the standard version of the plugin either.

screen-recorder-tue-jul-25-2023-18-42-25

screen-recorder-tue-jul-25-2023-18-40-25

I've tried unsubscribing from the event with the .off method, but no success there, also tried different workarounds but to no avail. If anybody has any idea how this issue can be solved, either with an workaround or any other solution, it would be very appreciated.

Thanks!

sinamcr7 commented 1 year ago

yeah I faced something similar, when I choose a tool other than point and just single click while holding shift it gets stuck and doesn't draw any annotation then, unless I refresh the page and avoid single click or choose point annotation and draw something then can choose other tools and draw with them.

sinamcr7 commented 1 year ago

any fixes for this bug?