Prevent vertical scroll
sashabeep opened this issue · 4 comments
sashabeep commented
Is there any parameter to fit media content to the screen vertically without scrolling?
nunhes commented
I need that too.
mmjaeger commented
so do I
Joedmin commented
I used the following CSS:
.vbox-overlay {
height: 100% !important;
}
.vbox-container {
height: 100% !important;
overflow: hidden !important;
}
.vbox-content {
height: 100% !important;
}
.vbox-child {
max-height: 100% !important;
width: auto !important;
background-color: transparent !important;
max-width: 100% !important;
height: 100%;
box-shadow: none !important;
display: flex;
}
.vbox-child img {
max-height: 100%;
max-width: 100%;
display: inline-block;
object-fit: contain;
}
Edit: there was an issue where portrait pictures would be cropped, fixed now. There might be some unused rules, but I'm no FE dev to judge
nicolafranchini commented
the new option fitView
has been introduced, you can set fitView: true
when initializing the script