diff --git a/frontend/src/common/viewer.js b/frontend/src/common/viewer.js index 99d89ffb8..2bf5d72b0 100644 --- a/frontend/src/common/viewer.js +++ b/frontend/src/common/viewer.js @@ -101,9 +101,12 @@ class Viewer { this.gallery = gallery; - gallery.listen("beforeChange", function() { - Event.publish("viewer.change", {gallery: gallery, item: gallery.currItem}); - }); + gallery.listen("close", () => Event.publish("viewer.pause")); + gallery.listen("shareLinkClick", () => Event.publish("viewer.pause")); + gallery.listen("initialZoomIn", () => Event.publish("viewer.pause")); + gallery.listen("initialZoomOut", () => Event.publish("viewer.pause")); + + gallery.listen("beforeChange", () => Event.publish("viewer.change", {gallery: gallery, item: gallery.currItem})); gallery.listen("beforeResize", () => { realViewportWidth = gallery.viewportSize.x * window.devicePixelRatio; diff --git a/frontend/src/component/p-photo-viewer.vue b/frontend/src/component/p-photo-viewer.vue index 51539f74f..3235157ef 100644 --- a/frontend/src/component/p-photo-viewer.vue +++ b/frontend/src/component/p-photo-viewer.vue @@ -34,6 +34,11 @@ + +