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 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'viewer/src/views/GalleryPicture.vue') 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; + } } -- cgit v1.2.3