Skip to content

Commit

Permalink
Fix for issue #94
Browse files Browse the repository at this point in the history
  • Loading branch information
seicke committed Nov 12, 2024
1 parent 56103dc commit 1eb69ca
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions aas-web-ui/src/components/UIComponents/AssetInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
v-if="assetObject.defaultThumbnail"
:src="assetObject.defaultThumbnail.path"
max-width="100%"
max-height="100%"
:max-height="thumbnailMaxHeight"
contain
style="border-radius: 4px"></v-img>
</v-list>
Expand All @@ -29,6 +29,12 @@
},
props: ['assetObject'],
data() {
return {
thumbnailMaxHeight: 0,
};
},
computed: {
assetInfo() {
let assetInfo = {
Expand All @@ -37,8 +43,25 @@
};
return assetInfo;
},
screenHeight() {
return document.documentElement.clientHeight;
},
},
mounted() {
window.addEventListener('resize', this.handleResize);
this.handleResize();
},
beforeUnmount() {
window.removeEventListener('resize', this.handleResize);
},
methods: {},
methods: {
handleResize() {
this.thumbnailMaxHeight = 0.3 * this.screenHeight;
},
},
});
</script>

0 comments on commit 1eb69ca

Please sign in to comment.