VenoBox icon indicating copy to clipboard operation
VenoBox copied to clipboard

Prevent vertical scroll

Open sashabeep opened this issue 3 years ago • 2 comments

Is there any parameter to fit media content to the screen vertically without scrolling?

sashabeep avatar Feb 04 '22 10:02 sashabeep

I need that too.

nunhes avatar Jun 17 '22 17:06 nunhes

so do I

mmjaeger avatar Aug 04 '22 22:08 mmjaeger

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

Joedmin avatar Dec 28 '22 12:12 Joedmin

the new option fitView has been introduced, you can set fitView: true when initializing the script

nicolafranchini avatar Nov 19 '23 00:11 nicolafranchini