-
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
The selected
and hovered
highlight states are indistinguishable for the redraw
function
#82
Comments
That's not yet implemented. (Only the interface is.) What's missing is some plumbing that triggers the redraw when the hover state changes. (Hover state is one of the things you can listen to from the |
Oh, great! |
Also, as we're talking about that I know that the clicks can be blocked out by using the following approach: text-annotator-js/packages/text-annotator-react/src/TextAnnotatorPopup.tsx Lines 61 to 73 in 263a67e
But, it won't work for blocking out the hovering over annotations that are not currently selected. And I even faced the redundant Screen.Recording.2024-04-02.at.14.09.13.movWhen I change the color - it triggers the |
Not sure I get it. Do you mean:
|
Yep, you got it right 👌🏻 |
Context
In the
baseRenderer
, thehover
state is populated onpointermove
when the cursor goes over the highlight:text-annotator-js/packages/text-annotator/src/highlight/baseRenderer.ts
Lines 63 to 82 in 263a67e
Issue
Unfortunately, the only hover reaction that happens in "real-time" is the application of the
hovered
class to thecontainer
element. Thestyle
prop doesn't receive the hovered highlight state when the hover is actually happening 🤷🏻♂️That's because the
redraw
function doesn't run on thepointermove
event. Which is a correct decision for the performance. But it makes theselected
andhovered
flags indistinguishable on the annotations styling levelScreen.Recording.2024-04-02.at.13.59.04.mov
Possible Changes
Add partial redraw only for the highlight that is "hit" by the mouse hovering
The text was updated successfully, but these errors were encountered: