|
@@ -363,6 +363,22 @@ class PDFPageView {
|
|
|
return selection ? selection.textContent : null
|
|
|
}
|
|
|
|
|
|
+ get selectedTextQuads() {
|
|
|
+ const textSelection = this.textSelection
|
|
|
+ if (!textSelection) return null
|
|
|
+ const selection = textSelection._selection
|
|
|
+ if (selection) {
|
|
|
+ const textQuads = textSelection.rects
|
|
|
+ const rect = textSelection.rect
|
|
|
+ return {
|
|
|
+ textQuads,
|
|
|
+ rect,
|
|
|
+ pageIndex: this.pageIndex
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null
|
|
|
+ }
|
|
|
+
|
|
|
#setDimensions() {
|
|
|
const { viewport } = this;
|
|
|
if (this.pdfPage) {
|