@getflip/swirl-components 0.174.0 → 0.174.1
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-lightbox.cjs.entry.js +3 -6
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-lightbox/swirl-lightbox.js +3 -6
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-lightbox.js +3 -6
- package/dist/esm/swirl-lightbox.entry.js +3 -6
- package/dist/swirl-components/p-443e8a4b.entry.js +1 -0
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-lightbox/swirl-lightbox.d.ts +1 -2
- package/package.json +1 -1
- package/dist/swirl-components/p-40a683a8.entry.js +0 -1
package/components.json
CHANGED
|
@@ -14,7 +14,6 @@ const SwirlLightbox = class {
|
|
|
14
14
|
constructor(hostRef) {
|
|
15
15
|
index.registerInstance(this, hostRef);
|
|
16
16
|
this.dragging = false;
|
|
17
|
-
this.mediaPlayers = [];
|
|
18
17
|
this.onCloseButtonClick = () => {
|
|
19
18
|
this.close();
|
|
20
19
|
};
|
|
@@ -31,7 +30,6 @@ const SwirlLightbox = class {
|
|
|
31
30
|
this.registerSlides = () => {
|
|
32
31
|
this.slides = Array.from(this.el.children).filter((el) => el.tagName === "SWIRL-FILE-VIEWER");
|
|
33
32
|
this.setSlideAttributes();
|
|
34
|
-
this.updateMediaPlayers();
|
|
35
33
|
};
|
|
36
34
|
this.onPointerDown = (event) => {
|
|
37
35
|
this.dragging = true;
|
|
@@ -186,7 +184,6 @@ const SwirlLightbox = class {
|
|
|
186
184
|
});
|
|
187
185
|
}, 300);
|
|
188
186
|
this.stopAllMediaPlayers();
|
|
189
|
-
this.updateMediaPlayers();
|
|
190
187
|
this.resetImageZoom();
|
|
191
188
|
}
|
|
192
189
|
setSlideAttributes() {
|
|
@@ -217,12 +214,12 @@ const SwirlLightbox = class {
|
|
|
217
214
|
unlockBodyScroll() {
|
|
218
215
|
bodyScrollLock_esm.enableBodyScroll(this.el);
|
|
219
216
|
}
|
|
220
|
-
|
|
217
|
+
getMediaPlayers() {
|
|
221
218
|
const mediaPlayers = utils.querySelectorAllDeep(this.el, "video");
|
|
222
|
-
|
|
219
|
+
return mediaPlayers;
|
|
223
220
|
}
|
|
224
221
|
stopAllMediaPlayers() {
|
|
225
|
-
this.
|
|
222
|
+
this.getMediaPlayers().forEach((mediaPlayer) => mediaPlayer.pause());
|
|
226
223
|
}
|
|
227
224
|
resetImageZoom() {
|
|
228
225
|
this.slides.forEach((slide) => {
|