Closed umesh-timalsina closed 3 years ago
Yikes, no I missed that. Thanks for reporting. I'll look into it.
An interesting dependecy :-) Couldn't reproduce at first - it happend only when calling getAnnotations()
in the selectAnnotation
event handler. It was a timing issue because of a recent change to fix another (and completely different) issue:
https://github.com/recogito/annotorious-openseadragon/issues/44
When selecting an annotation, the original shape gets replaced with an editable version. Because the fix to #44 deferred the removal of the original shape after the event trigger, there were indeed to copies of the annotation on the annotation layer when the handler got called.
Fixed now!
Not sure if this has been raised before, but the following snippet will return two nodes for the selected annotation. Upon inspection, there's no duplicate shape but the dynamic class change to
editable selected
might be causing the issue? https://github.com/recogito/annotorious-openseadragon/blob/c256d59590e69e1f252d592c297a7b229740e60d/src/OSDAnnotationLayer.js#L215-L218