mathiasmeuleman / react-pdf-selection Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I am trying to set a newAreaSelectionComponent that has a popover where the user can enter some more data about the selection before saving it. The problem I am having is every time I click into the Popover it triggers a reset of the newAreaSelectionComponent. How can I programatically control reseting when the newAreaSelectionComponent is closed so losing focus does not automatically reset the selection.
newAreaSelectionComponent={(boundingRect)=>{
return(
<CustomSelectionComponent boundingRect={boundingRect.boundingRect} selectionPageNumber={selectionPageNumber}/>
)
}}
<Popover>
<div
style={{
...boundingRect,
position: "absolute",
border: "1px dashed #333",
background: "rgba(252, 232, 151, 1)",
mixBlendMode: "multiply",
}}
/>
</Popover>
In your API Reference in Readme.md position
property of SelectionType
is NormalizedPosition
.
However in the source code in types.ts we can read that both TextSelectionType
and AreaSelectionType
have position
of type Position
not NormalizedPosition
.
Is this intended?
Currently, selecting text that spans multiple pages will only result in the text on the first of those pages being properly selected. It would be nice if this library would support multi-page text selections.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.