@d-i-t-a/reader 2.0.0-beta.11 → 2.0.0-beta.12
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
CHANGED
|
@@ -53816,18 +53816,25 @@ var ContentProtectionModule = class {
|
|
|
53816
53816
|
}
|
|
53817
53817
|
}
|
|
53818
53818
|
recalculate(delay2 = 0) {
|
|
53819
|
-
|
|
53820
|
-
|
|
53821
|
-
|
|
53822
|
-
|
|
53823
|
-
this.rects
|
|
53819
|
+
return new Promise((resolve) => {
|
|
53820
|
+
if (this.properties?.enableObfuscation) {
|
|
53821
|
+
const onDoResize = (0, import_debounce3.debounce)(() => {
|
|
53822
|
+
this.calcRects(this.rects);
|
|
53823
|
+
if (this.rects !== void 0) {
|
|
53824
|
+
this.rects.forEach((rect) => this.toggleRect(rect, this.securityContainer, this.isHacked));
|
|
53825
|
+
}
|
|
53826
|
+
resolve(true);
|
|
53827
|
+
}, delay2);
|
|
53828
|
+
if (this.rects) {
|
|
53829
|
+
this.observe();
|
|
53830
|
+
onDoResize();
|
|
53831
|
+
} else {
|
|
53832
|
+
resolve(false);
|
|
53824
53833
|
}
|
|
53825
|
-
}
|
|
53826
|
-
|
|
53827
|
-
this.observe();
|
|
53828
|
-
onDoResize();
|
|
53834
|
+
} else {
|
|
53835
|
+
resolve(false);
|
|
53829
53836
|
}
|
|
53830
|
-
}
|
|
53837
|
+
});
|
|
53831
53838
|
}
|
|
53832
53839
|
calcRects(rects) {
|
|
53833
53840
|
if (rects !== void 0) {
|
|
@@ -56110,6 +56117,11 @@ var IFrameNavigator = class extends import_events.default {
|
|
|
56110
56117
|
this.view?.goToProgression(bookViewPosition);
|
|
56111
56118
|
}
|
|
56112
56119
|
this.newPosition = void 0;
|
|
56120
|
+
if (this.rights?.enableContentProtection) {
|
|
56121
|
+
if (this.contentProtectionModule !== void 0) {
|
|
56122
|
+
await this.contentProtectionModule.recalculate(10);
|
|
56123
|
+
}
|
|
56124
|
+
}
|
|
56113
56125
|
this.hideLoadingMessage();
|
|
56114
56126
|
this.showIframeContents();
|
|
56115
56127
|
if (this.rights.enableMediaOverlays && this.mediaOverlayModule !== void 0 && this.hasMediaOverlays) {
|