diff options
author | bobzel <zzzman@gmail.com> | 2023-04-17 15:06:15 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-04-17 15:06:15 -0400 |
commit | 8619a61dd33cdbfa1b8fe3e762306bbf52dbcbad (patch) | |
tree | a375f817a1df562eea48361540479d4293b3391a /src | |
parent | 740272abb7fe2f477ee4d53363e04f8c77ed1819 (diff) |
fixed text selection on pdfs
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index d82a7d1ae..b9a22473a 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -422,7 +422,7 @@ export class PDFViewer extends React.Component<IViewerProps> { const clientRects = selRange.getClientRects(); for (let i = 0; i < clientRects.length; i++) { const rect = clientRects.item(i); - if (rect && rect.width !== this._mainCont.current.clientWidth && rect.width) { + if (rect?.width && rect.width < this._mainCont.current.clientWidth / this.props.ScreenToLocalTransform().Scale) { const scaleX = this._mainCont.current.offsetWidth / boundingRect.width; const pdfScale = NumCast(this.props.layoutDoc._viewScale, 1); const annoBox = document.createElement('div'); |