@d-i-t-a/reader 2.1.1 → 2.1.3
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.
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +2 -2
- package/dist/reader.js +2 -2
- package/dist/reader.js.map +2 -2
- package/dist/types/modules/pagebreak/PageBreakModule.d.ts +1 -1
- package/dist/types/navigator/IFrameNavigator.d.ts +1 -0
- package/dist/types/reader.d.ts +1 -0
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -37838,6 +37838,8 @@ var TextHighlighter = class {
|
|
|
37838
37838
|
let doc = el.ownerDocument;
|
|
37839
37839
|
el.addEventListener("mouseup", this.toolboxShowDelayed.bind(this));
|
|
37840
37840
|
el.addEventListener("touchend", this.toolboxShowDelayed.bind(this));
|
|
37841
|
+
doc.addEventListener("mouseup", this.toolboxShowDelayed.bind(this));
|
|
37842
|
+
doc.addEventListener("touchend", this.toolboxShowDelayed.bind(this));
|
|
37841
37843
|
if (!hasEventListener) {
|
|
37842
37844
|
window.addEventListener("resize", this.toolboxPlacement.bind(this));
|
|
37843
37845
|
}
|
|
@@ -37871,6 +37873,8 @@ var TextHighlighter = class {
|
|
|
37871
37873
|
let doc = el.ownerDocument;
|
|
37872
37874
|
el.removeEventListener("mouseup", this.toolboxShowDelayed.bind(this));
|
|
37873
37875
|
el.removeEventListener("touchend", this.toolboxShowDelayed.bind(this));
|
|
37876
|
+
doc.removeEventListener("mouseup", this.toolboxShowDelayed.bind(this));
|
|
37877
|
+
doc.removeEventListener("touchend", this.toolboxShowDelayed.bind(this));
|
|
37874
37878
|
window.removeEventListener("resize", this.toolboxPlacement.bind(this));
|
|
37875
37879
|
doc.removeEventListener("selectionchange", this.toolboxPlacement.bind(this));
|
|
37876
37880
|
el.removeEventListener("mousedown", this.toolboxHide.bind(this));
|
|
@@ -45032,6 +45036,11 @@ var IFrameNavigator = class extends import_eventemitter3.default {
|
|
|
45032
45036
|
this.goTo(locator);
|
|
45033
45037
|
}
|
|
45034
45038
|
}
|
|
45039
|
+
async goToPage(page) {
|
|
45040
|
+
if (this.pageBreakModule !== void 0) {
|
|
45041
|
+
await this.pageBreakModule.goToPageNumber(page);
|
|
45042
|
+
}
|
|
45043
|
+
}
|
|
45035
45044
|
snapToSelector(selector2) {
|
|
45036
45045
|
const doc = this.iframes[0].contentDocument;
|
|
45037
45046
|
if (doc) {
|
|
@@ -48459,6 +48468,9 @@ var D2Reader = class {
|
|
|
48459
48468
|
this.goToPosition = async (value) => {
|
|
48460
48469
|
return this.navigator.goToPosition(value);
|
|
48461
48470
|
};
|
|
48471
|
+
this.goToPage = async (page) => {
|
|
48472
|
+
await this.navigator.goToPage(page);
|
|
48473
|
+
};
|
|
48462
48474
|
this.nextResource = () => {
|
|
48463
48475
|
this.navigator.nextResource();
|
|
48464
48476
|
};
|