aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/components/LdPicture.vue
diff options
context:
space:
mode:
authorZero~Informatique2020-02-13 18:17:35 +0100
committerZero~Informatique2020-02-13 18:17:35 +0100
commit6c51a97bce7963fba47892602c1214b3bcdcd410 (patch)
tree0df87fda5a480718cf35b6087555039a706df524 /viewer/src/components/LdPicture.vue
parent9c2af5dcd2d2c8754e4c74e02141822c0964a5a8 (diff)
parentef1778e051e007f08f9188a479d04fdf95a57d21 (diff)
downloadldgallery-6c51a97bce7963fba47892602c1214b3bcdcd410.tar.gz
Merge branch 'oz-config-json' into develop
# Conflicts: # scripts/win_compile_example.cmd
Diffstat (limited to 'viewer/src/components/LdPicture.vue')
-rw-r--r--viewer/src/components/LdPicture.vue12
1 files changed, 7 insertions, 5 deletions
diff --git a/viewer/src/components/LdPicture.vue b/viewer/src/components/LdPicture.vue
index 8a9a08e..a5faeb3 100644
--- a/viewer/src/components/LdPicture.vue
+++ b/viewer/src/components/LdPicture.vue
@@ -28,7 +28,7 @@
28 @dragscrollend="dragScrollClickFix.onDragScrollEnd()" 28 @dragscrollend="dragScrollClickFix.onDragScrollEnd()"
29 > 29 >
30 <v-lazy-image 30 <v-lazy-image
31 :src="pictureSrc()" 31 :src="pictureSrc(picture.properties.resource)"
32 :class="{'slow-loading': Boolean(slowLoadingStyle)}" 32 :class="{'slow-loading': Boolean(slowLoadingStyle)}"
33 :style="slowLoadingStyle" 33 :style="slowLoadingStyle"
34 @load="clearSlowLoading" 34 @load="clearSlowLoading"
@@ -67,15 +67,17 @@ export default class LdPicture extends Vue {
67 this.loader = false; 67 this.loader = false;
68 } 68 }
69 69
70 pictureSrc() { 70 pictureSrc(resource: string) {
71 return `${process.env.VUE_APP_DATA_URL}${this.picture.properties.resource}`; 71 return `${process.env.VUE_APP_DATA_URL}${this.$galleryStore.config!.galleryRoot}${resource}`;
72 } 72 }
73 73
74 generateSlowLoadingStyle() { 74 generateSlowLoadingStyle() {
75 this.clearSlowLoading(); 75 this.clearSlowLoading();
76 this.loader = true; 76 this.loader = true;
77 if (this.picture.thumbnail) 77 if (this.picture.thumbnail) {
78 this.slowLoadingStyle = `background-image: url('${process.env.VUE_APP_DATA_URL}${this.picture.thumbnail.resource}');`; 78 const url = this.pictureSrc(this.picture.thumbnail.resource);
79 this.slowLoadingStyle = `background-image: url('${url}');`;
80 }
79 } 81 }
80} 82}
81</script> 83</script>