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 42 forks source link

cancelSelected fired when selecting other annotation programmatically #77

Closed enekonieto closed 3 years ago

enekonieto commented 3 years ago

If you select an annotation using selectAnnotation(), selectAnnotation event won't be launched (nice!), but if another annotation was previously selected it will launch cancelSelected event (not nice).

Is this intended? Is there a way to detect such situations (that selection was cancelled because another annotation was selected)?

Thanks!

rsimon commented 3 years ago

Yes that's the intended behavior. Deselect (without save/update) corresponds to a cancel event. There's currently no way to distinguish a "deselect-cancel" from an explicitly triggered cancel.