pdfjs-viewer-highlight-echo 5.4.460 → 5.4.462

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,8 +21,8 @@
21
21
  */
22
22
 
23
23
  /**
24
- * pdfjsVersion = 5.4.460
25
- * pdfjsBuild = 8489d7097
24
+ * pdfjsVersion = 5.4.462
25
+ * pdfjsBuild = 34e1cb08c
26
26
  */
27
27
  /******/ var __webpack_modules__ = ({
28
28
 
@@ -11850,6 +11850,14 @@ class AnnotationEditor {
11850
11850
  button.addEventListener("click", event => {
11851
11851
  event.stopPropagation();
11852
11852
  const editorRect = this.div.getBoundingClientRect();
11853
+ let selectedText = "";
11854
+ if (this.contentText) {
11855
+ selectedText = this.contentText;
11856
+ } else if (this.contentDiv) {
11857
+ selectedText = this.contentDiv.textContent || "";
11858
+ } else {
11859
+ selectedText = this.div.textContent || "";
11860
+ }
11853
11861
  const editorInfo = {
11854
11862
  editorId: this.id,
11855
11863
  editorType: this.editorType,
@@ -11868,7 +11876,7 @@ class AnnotationEditor {
11868
11876
  width: editorRect.width,
11869
11877
  height: editorRect.height
11870
11878
  },
11871
- textContent: this.div.textContent || ""
11879
+ textContent: selectedText
11872
11880
  };
11873
11881
  this._uiManager.saveSelectionAsJson("editor_save_button", editorInfo);
11874
11882
  });
@@ -20816,7 +20824,7 @@ function getDocument(src = {}) {
20816
20824
  }
20817
20825
  const docParams = {
20818
20826
  docId,
20819
- apiVersion: "5.4.460",
20827
+ apiVersion: "5.4.462",
20820
20828
  data,
20821
20829
  password,
20822
20830
  disableAutoFetch,
@@ -22481,8 +22489,8 @@ class InternalRenderTask {
22481
22489
  }
22482
22490
  }
22483
22491
  }
22484
- const version = "5.4.460";
22485
- const build = "8489d7097";
22492
+ const version = "5.4.462";
22493
+ const build = "34e1cb08c";
22486
22494
 
22487
22495
  ;// ./src/display/editor/color_picker.js
22488
22496
 
@@ -27742,6 +27750,9 @@ class HighlightEditor extends AnnotationEditor {
27742
27750
  numberOfColors: data.get("color").size
27743
27751
  };
27744
27752
  }
27753
+ get contentText() {
27754
+ return this.#text;
27755
+ }
27745
27756
  #createOutlines() {
27746
27757
  const outliner = new HighlightOutliner(this.#boxes, 0.001);
27747
27758
  this.#highlightOutlines = outliner.getOutlines();