aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/views')
-rw-r--r--viewer/src/views/GalleryPicture.vue34
-rw-r--r--viewer/src/views/MainLayout.vue1
2 files changed, 33 insertions, 2 deletions
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 @@
18--> 18-->
19 19
20<template> 20<template>
21 <div> 21 <div
22 v-dragscroll
23 class="scrollbar"
24 :class="{fitToScreen: !$uiStore.fullscreen, originalSize: $uiStore.fullscreen}"
25 @click="onClick"
26 @dragscrollstart="dragging=true"
27 >
22 <img :src="pictureSrc" /> 28 <img :src="pictureSrc" />
23 </div> 29 </div>
24</template> 30</template>
@@ -30,11 +36,37 @@ import { Component, Vue, Prop } from "vue-property-decorator";
30export default class GalleryPicture extends Vue { 36export default class GalleryPicture extends Vue {
31 @Prop({ required: true }) readonly picture!: Gallery.Picture; 37 @Prop({ required: true }) readonly picture!: Gallery.Picture;
32 38
39 dragging: boolean = false;
40
33 get pictureSrc() { 41 get pictureSrc() {
34 return `${process.env.VUE_APP_DATA_URL}${this.picture.properties.resource}`; 42 return `${process.env.VUE_APP_DATA_URL}${this.picture.properties.resource}`;
35 } 43 }
44
45 onClick() {
46 if (!this.dragging) this.$uiStore.toggleFullscreen();
47 this.dragging = false;
48 }
36} 49}
37</script> 50</script>
38 51
39<style lang="scss"> 52<style lang="scss">
53.fitToScreen {
54 display: flex;
55 justify-content: space-around;
56 height: 100%;
57 & > img {
58 object-fit: contain;
59 }
60}
61.originalSize {
62 display: block;
63 text-align: center;
64 cursor: grab;
65 height: 100%;
66 & > img {
67 max-width: unset;
68 max-height: unset;
69 object-fit: none;
70 }
71}
40</style> 72</style>
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 @@
22 <panel-top class="layout layout-top" /> 22 <panel-top class="layout layout-top" />
23 <panel-left class="layout layout-left" /> 23 <panel-left class="layout layout-left" />
24 <router-view class="layout layout-content scrollbar" /> 24 <router-view class="layout layout-content scrollbar" />
25 <ld-button-fullscreen />
26 <b-loading :active="isLoading" is-full-page /> 25 <b-loading :active="isLoading" is-full-page />
27 </div> 26 </div>
28</template> 27</template>