Browse Source

fix: fit image and avoid cropping bottom part in modal

pull/8426/head
Pranav C 7 months ago
parent
commit
2539477b00
  1. 2
      packages/nc-gui/components/cell/attachment/Image.vue
  2. 2
      packages/nc-gui/components/cell/attachment/Modal.vue

2
packages/nc-gui/components/cell/attachment/Image.vue

@ -16,7 +16,7 @@ const onError = () => index.value++
<template> <template>
<LazyNuxtImg <LazyNuxtImg
v-if="index < props.srcs.length" v-if="index < props.srcs.length"
class="m-auto h-full w-auto" class="m-auto h-full w-auto object-cover"
:src="props.srcs[index]" :src="props.srcs[index]"
:alt="props?.alt || ''" :alt="props?.alt || ''"
placeholder placeholder

2
packages/nc-gui/components/cell/attachment/Modal.vue

@ -170,7 +170,7 @@ const handleFileDelete = (i: number) => {
<LazyCellAttachmentImage <LazyCellAttachmentImage
v-if="isImage(item.title, item.mimetype)" v-if="isImage(item.title, item.mimetype)"
:srcs="getPossibleAttachmentSrc(item)" :srcs="getPossibleAttachmentSrc(item)"
class="object-cover h-64 m-auto justify-center" class="max-h-full h-64 m-auto justify-center"
@click.stop="onClick(item)" @click.stop="onClick(item)"
/> />

Loading…
Cancel
Save