-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot select an annotation inside another annotation #175
Comments
@RahelaPogacean hi. I'm using an older version in production (2.5.16) and don't have that issue. Tested interactively any combination and I get to select all of them independently of the order, so I have a few questions:
I have not overly tested the newer code (I really love when a piece of code/version works for us, and kinda stick with it, sorry!) but I would suggest:
d2ad213#diff-bf33addc32978ffda1071f72299d6302476ce1ee1c6e0032adde06654454cfd1R283-R284 My brain tells me (incorrectly sometimes) that preventing a default (which might allow another event listener to delegate? who knows right)? might interfere in some ways. But that said, if the issue is not the code itself, debugging that part of the code I pointed might help you see who/when/why your inner annotation is not selected Sorry for not being of more help |
@DiegoPino thank you for your response! When hovering over the inner annotation, it is not highlighted. And I also tried with your version and the selection is not working on the case I presented. I forgot to mention that the inner annotation is not selected for freeform and better polygon annotations. |
@RahelaPogacean ok, that helps! I will check with polygons. Maybe the bounding box for those is not calculated in the same way. Might take me a few hours (busy day) |
@DiegoPino thank you, I am waiting for your response |
Hi, sorry for the delay here. I really can't reproduce the issue you are having. Screen.Recording.2023-07-31.at.10.02.45.AM.mp4Anything that you have customized (CSS/ other DOM elements on top?, custom plugins)? that you could share/could help me, at least, to reproduce the error? |
@DiegoPino This is the way I create and select annotations. As you can see, the second scenario doesn't work, Here there are also the styles that I use in my application, which are still work in progress. Thank you and waiting for your feedback. Annotation_selection.mp4 |
Thanks for posting this. Looks like it might be related to the freehand tool then. Annotorious sorts annotations by size, in order to ensure that the smallest is always on top. My guess is that something's wrong with the area calculation code in the freehand plugin, which would then cause that behavior. |
@rsimon This is also reproducing for better polygon. |
Hm. Well that's weird then. Polygon area computation is definitely working. Do you have any errors on the console? If anything breaks e.g. in your "onSelectionCreated" or "onAnnotationCreated" handlers, this would stop further execution and could cause Annotorious to not run the sorting. |
I don't have any errors |
@RahelaPogacean any chance you can share your WIP code? |
Hello!
I am using Annotorius with OpenSeadragon in my Angular application and I encountered the following issue: if I create an annotation inside another one, I am not able to select the inner annotation. The problem comes when I create the bigger annotation firstly and after that, the smaller/inner one. When I firstly create the smaller annotation and after that, the bigger one, both annotations are perfectly selected.
Any ideas how to manage to select both annotations in all situations?
The text was updated successfully, but these errors were encountered: