diff --git a/resources/assets/js/components/presenter/MixedAlbumPresenter.vue b/resources/assets/js/components/presenter/MixedAlbumPresenter.vue index f105c1205..0014e8bfc 100644 --- a/resources/assets/js/components/presenter/MixedAlbumPresenter.vue +++ b/resources/assets/js/components/presenter/MixedAlbumPresenter.vue @@ -28,8 +28,8 @@ -
- + + + + + + +
+ +
+ +

Error: Problem rendering preview.

+ +
+
diff --git a/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue b/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue index 173ceb3bb..75fffcd97 100644 --- a/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue +++ b/resources/assets/js/components/presenter/PhotoAlbumPresenter.vue @@ -1,11 +1,11 @@ @@ -58,6 +68,42 @@ return { cursor: 0 } + }, + + created() { + // window.addEventListener("keydown", this.keypressNavigation); + }, + + beforeDestroy() { + // window.removeEventListener("keydown", this.keypressNavigation); + }, + + methods: { + loadSensitive() { + this.$refs.carousel.onResize(); + this.$refs.carousel.goToPage(0); + }, + + keypressNavigation(e) { + let ref = this.$refs.carousel; + if (e.keyCode == "37") { + e.preventDefault(); + + let direction = "backward"; + + ref.advancePage(direction); + ref.$emit("navigation-click", direction); + } + + if (e.keyCode == "39") { + e.preventDefault(); + + let direction = "forward"; + + ref.advancePage(direction); + ref.$emit("navigation-click", direction); + } + } } } \ No newline at end of file