Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ export default {
}

const previewSize = Math.ceil(this.previewSize * window.devicePixelRatio)
return generateUrl('/core/preview?fileId={fileId}&x={width}&y={height}', {
// expand width but keep a max height
return generateUrl('/core/preview?fileId={fileId}&x=-1&y={height}&a=1', {
fileId: this.id,
width: previewSize,
height: previewSize,
})
},
Expand Down Expand Up @@ -290,14 +290,18 @@ export default {
object-fit: cover;
}

.loading {
display: inline-block;
height: 128px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we once also discussed to use more height, e.g. 300? cc @jancborchardt
But not sure what the endpoint does if the image is actually smalled?

Copy link
Member Author

@PVince81 PVince81 Oct 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can check with it. otherwise there's a "mode=fill" option which I'm not sure what it does, might fit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested with a picture of 50x50 and the preview provider doesn't make it bigger.
However the image tag will scale it up, so it will have the same height as the other pictures:
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay I found the ticket with the decision to make it 384px: #3746 (comment)

I'll adjust

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with new height:
image

and for a wide image:
image

margin-left: 32px;
}

.preview {
display: block;
width: 128px;
display: inline-block;
height: 128px;
}
.preview-64 {
display: block;
width: 64px;
display: inline-block;
height: 64px;
}

Expand All @@ -308,7 +312,6 @@ export default {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
margin-top: 4px;
}

&:not(.file-preview--viewer-available) {
Expand Down