Image now porperly scaled on any image aspect ratio

This commit is contained in:
EisiBaer committed 2023-07-30 21:15:20 +02:00
1 parent be8aab0986
commit e21793ada4
3 files changed
+8 -7

No files matched your search

+4
View File
@@ -184,4 +184,8 @@ $utilities: map-merge(
.buzzer-answering:active{
background-color: shade-color( $green-active, 10% );
}
.image-contain{
object-fit: contain;
}
+2 -5
View File
@@ -54,12 +54,12 @@ watch(
<div class="d-flex justify-content-center align-items-center position-absolute bottom-0 start-0 h-100 w-100 bg-dark-primary">
<template v-if="route.path.includes('create') && getImageInGameCreationStore !== undefined">
<div class="h-75 w-100 text-center">
<img class="h-100" :src="getImageInGameCreationStore.url" />
<img class="image-contain h-100 w-100" :src="getImageInGameCreationStore.url" loading="eager" />
</div>
</template>
<template v-else-if="answer.filename">
<div class="h-75 w-100 text-center">
<img ref="imageRef" class="h-100" src="" />
<img ref="imageRef" class="image-contain h-100 w-100" src="" loading="eager" />
</div>
</template>
<div class="d-flex justify-content-center align-items-center position-absolute bottom-0 start-50 translate-middle mt-5">
@@ -77,6 +77,3 @@ watch(
</div>
</template>
</template>
<style scoped>
</style>
+2 -2
View File
@@ -76,12 +76,12 @@ watch(
<template v-if="question.questionType === 'imageQuestion'">
<template v-if="route.path.includes('create') && getImageInGameCreationStore !== undefined">
<div class="h-75 w-100 text-center">
<img class="h-100" :src="getImageInGameCreationStore.url" />
<img class="image-contain h-100 w-100" :src="getImageInGameCreationStore.url" loading="eager" />
</div>
</template>
<template v-else-if="question.filename">
<div class="h-75 w-100 text-center">
<img ref="imageRef" class="h-100" src="" />
<img ref="imageRef" class="image-contain h-100 w-100" src="" loading="eager" />
</div>
</template>
</template>