-
Notifications
You must be signed in to change notification settings - Fork 7
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
Export the redraw
function from the TextAnnotator
#103
Comments
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Jun 6, 2024
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Jul 9, 2024
# Conflicts: # packages/text-annotator/src/TextAnnotator.ts
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Jul 9, 2024
# Conflicts: # packages/text-annotator/src/TextAnnotator.ts
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Oct 7, 2024
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Oct 7, 2024
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Oct 7, 2024
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Oct 9, 2024
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Oct 29, 2024
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Oct 29, 2024
# Conflicts: # packages/text-annotator/src/utils/index.ts
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Nov 4, 2024
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Nov 4, 2024
oleksandr-danylchenko
added a commit
to oleksandr-danylchenko/text-annotator-js
that referenced
this issue
Dec 16, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
By default, the highlights layer gets redrawn whenever a user scrolls a page. To trigger that redraw process, the
scroll
event listener is attached to thedocument.body
:text-annotator-js/packages/text-annotator/src/highlight/baseRenderer.ts
Lines 132 to 134 in 35056b3
Issue
Unfortunately, when the
TextAnnotator
is rendered on a page with theoverflow: hidden
styles applied to thebody
- noscroll
events will be processed. Which will make the highlights look out of sync with the annotated content.Such style is common for web apps written with mobile-development frameworks like the Ionic Capacitor.
Screen.Recording.2024-06-06.at.12.30.46.mov
Suggested Changes
Export the
redraw
method from theTextAnnotator
instance to allow manual triggering for the highlights layer updates. The consuming app will know where the alternative scroll listener should be attached and when the redrawing should be triggered 👌🏻The text was updated successfully, but these errors were encountered: