agentcooper / react-pdf-highlighter

Set of React components for PDF annotation
https://agentcooper.github.io/react-pdf-highlighter/
MIT License
1.04k stars 407 forks source link

Fix AreaHighlight positioning issue #227

Closed niowniow closed 2 weeks ago

niowniow commented 1 year ago

The 1px border shifted each rendered AreaHighlight by an offset. The more AreaHighlights were, added the bigger the shift. The consequence was, that if many AreaHighlights were added to a document, the highlights were not rendered to the correct positions. It also resulted in a misfit between the position of a highlight that was drawn and how it was rendered after the annotation was added. Removing the css border Attribute fixes these issues. If the border is desired, it can be added to the AreaHighlight__part css