@getflip/swirl-components 0.174.1 → 0.174.2
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/components.json +1 -1
- package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +7 -3
- package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.js +7 -3
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-file-viewer-pdf2.js +7 -3
- package/dist/esm/swirl-file-viewer_7.entry.js +7 -3
- package/dist/swirl-components/{p-47ff9c93.entry.js → p-775f5bab.entry.js} +3 -3
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.d.ts +1 -0
- package/package.json +1 -1
package/components.json
CHANGED
|
@@ -29886,11 +29886,14 @@ const SwirlFileViewerPdf = class {
|
|
|
29886
29886
|
}
|
|
29887
29887
|
async componentWillLoad() {
|
|
29888
29888
|
window.pdf.GlobalWorkerOptions.workerSrc = this.workerSrc;
|
|
29889
|
-
await this.getPages();
|
|
29890
29889
|
}
|
|
29891
29890
|
async componentDidLoad() {
|
|
29891
|
+
await this.getPages();
|
|
29892
29892
|
await this.updateVisiblePages();
|
|
29893
29893
|
this.activate.emit(this.el);
|
|
29894
|
+
}
|
|
29895
|
+
componentDidRender() {
|
|
29896
|
+
this.updateVisiblePages();
|
|
29894
29897
|
this.determineScrollStatus();
|
|
29895
29898
|
}
|
|
29896
29899
|
disconnectedCallback() {
|
|
@@ -29982,10 +29985,11 @@ const SwirlFileViewerPdf = class {
|
|
|
29982
29985
|
this.doc.destroy();
|
|
29983
29986
|
}
|
|
29984
29987
|
this.doc = await pdf.getDocument(this.file).promise;
|
|
29988
|
+
const pages = [];
|
|
29985
29989
|
for (let i = 1; i <= this.doc.numPages; i++) {
|
|
29986
|
-
|
|
29987
|
-
this.pages[i] = page;
|
|
29990
|
+
pages.push(this.doc.getPage(i));
|
|
29988
29991
|
}
|
|
29992
|
+
this.pages = await Promise.all(pages);
|
|
29989
29993
|
this.loading = false;
|
|
29990
29994
|
}
|
|
29991
29995
|
catch (e) {
|
|
@@ -45,11 +45,14 @@ export class SwirlFileViewerPdf {
|
|
|
45
45
|
}
|
|
46
46
|
async componentWillLoad() {
|
|
47
47
|
window.pdf.GlobalWorkerOptions.workerSrc = this.workerSrc;
|
|
48
|
-
await this.getPages();
|
|
49
48
|
}
|
|
50
49
|
async componentDidLoad() {
|
|
50
|
+
await this.getPages();
|
|
51
51
|
await this.updateVisiblePages();
|
|
52
52
|
this.activate.emit(this.el);
|
|
53
|
+
}
|
|
54
|
+
componentDidRender() {
|
|
55
|
+
this.updateVisiblePages();
|
|
53
56
|
this.determineScrollStatus();
|
|
54
57
|
}
|
|
55
58
|
disconnectedCallback() {
|
|
@@ -141,10 +144,11 @@ export class SwirlFileViewerPdf {
|
|
|
141
144
|
this.doc.destroy();
|
|
142
145
|
}
|
|
143
146
|
this.doc = await getDocument(this.file).promise;
|
|
147
|
+
const pages = [];
|
|
144
148
|
for (let i = 1; i <= this.doc.numPages; i++) {
|
|
145
|
-
|
|
146
|
-
this.pages[i] = page;
|
|
149
|
+
pages.push(this.doc.getPage(i));
|
|
147
150
|
}
|
|
151
|
+
this.pages = await Promise.all(pages);
|
|
148
152
|
this.loading = false;
|
|
149
153
|
}
|
|
150
154
|
catch (e) {
|