-
Notifications
You must be signed in to change notification settings - Fork 6
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
Controlling selection behaviour #153
Comments
Perhaps I am using selection state in a way that doesn't quite match its intended use... |
Hi, it's all still a bit work in progress in here ;-) I'll take a look when I get the chance. But I think all you might be missing is the |
Thanks! Are any of these things that I could help with? If you're open to me helping with these things, it would be good to understand how I could address the main blocking one ( |
Definitely. The You'd also have to hand the |
That's already been handled by the parent's |
Hello! Wondering about controlling selection behaviour from userland.
I am making an app that has different behaviours on selection when different keys are pressed, and needs to be able to conditionally select a group of related annotations when one of them are clicked, and toggle selection state of a single annotation without interfering with other annotations. Initially, looking at the interface of
clickAnnotation
event here, I thought I would be able to retrieve whether modifier keys are pressed from the original event. However, it seems likeclickAnnotation
is not implemented for@recogito/text-annotator
.I then tried listening for DOM click events and checking whether they were on a range of an annotation:
But it seems like internally, even with
userSelectAction
set toUserSelectAction.NONE
,TextAnnotatorState
is callinguserSelect
here:text-annotator-js/packages/text-annotator/src/SelectionHandler.ts
Line 197 in ead4840
Which in turn will either set the selected annotations to an empty array, or to a single one.
Is there any way around this? Would I need to maintain selection state in my own app or perhaps in an annotation's properties?
The text was updated successfully, but these errors were encountered: