diff --git a/src/components/MosaicModal.vue b/src/components/MosaicModal.vue index 5192c85..0f12b28 100644 --- a/src/components/MosaicModal.vue +++ b/src/components/MosaicModal.vue @@ -80,19 +80,19 @@ onMounted(() => { gifWindow.value, { opacity: 0, height: 0 }, { opacity: 1, height: 'auto', ...ANIMATION_SETTINGS }, - '+0.1', + '<+0.1', ) tl.value.fromTo( contentWindow.value, { opacity: 0, height: 0 }, { opacity: 1, height: 'auto', ...ANIMATION_SETTINGS }, - '+0.1', + '<+0.1', ) tl.value.fromTo( closeWindow.value, - { opacity: 0, height: 0 }, - { opacity: 1, height: 'auto', ...ANIMATION_SETTINGS }, - '+0.1', + { opacity: 0 }, + { opacity: 1, ...ANIMATION_SETTINGS }, + '<+0.1', ) tl.value.pause(0) @@ -210,7 +210,7 @@ defineExpose({ animateIn, animateOut }) } &.content { grid-column: 1/-1; - height: 100%; + max-height: 100%; overflow: hidden; position: relative; diff --git a/src/components/strapi/Media.vue b/src/components/strapi/Media.vue index cf05545..e921566 100644 --- a/src/components/strapi/Media.vue +++ b/src/components/strapi/Media.vue @@ -83,7 +83,7 @@ const ratio = computed(() => { const aspect = computed(() => { // calculate if no aspect provided if (props.aspect === -1) { - return ratio.value * 100 + return ratio.value ? ratio.value * 100 : 100 } // otherwise, parse provided aspect, handling both 56.25 and 0.5625 style