From e91065602eeeebef236dae29e67d8e3334ab4029 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Wed, 29 Jan 2020 07:54:03 +0100 Subject: viewer: improved the picture layout. clicking a picture will switch between resized-to-screen and original-size (+fullscreen). drag-n-drop scrolls/moves the picture, just like a touch device. Resolves #19 --- viewer/src/views/GalleryPicture.vue | 34 +++++++++++++++++++++++++++++++++- viewer/src/views/MainLayout.vue | 1 - 2 files changed, 33 insertions(+), 2 deletions(-) (limited to 'viewer/src/views') diff --git a/viewer/src/views/GalleryPicture.vue b/viewer/src/views/GalleryPicture.vue index 3689cb3..579e74b 100644 --- a/viewer/src/views/GalleryPicture.vue +++ b/viewer/src/views/GalleryPicture.vue @@ -18,7 +18,13 @@ --> @@ -30,11 +36,37 @@ import { Component, Vue, Prop } from "vue-property-decorator"; export default class GalleryPicture extends Vue { @Prop({ required: true }) readonly picture!: Gallery.Picture; + dragging: boolean = false; + get pictureSrc() { return `${process.env.VUE_APP_DATA_URL}${this.picture.properties.resource}`; } + + onClick() { + if (!this.dragging) this.$uiStore.toggleFullscreen(); + this.dragging = false; + } } diff --git a/viewer/src/views/MainLayout.vue b/viewer/src/views/MainLayout.vue index 1528e64..7a75eb1 100644 --- a/viewer/src/views/MainLayout.vue +++ b/viewer/src/views/MainLayout.vue @@ -22,7 +22,6 @@ - -- cgit v1.2.3