Commit 19d075bc authored by Bernhard Geier's avatar Bernhard Geier
Browse files

image.php: calculate maximum image height instead of guessing it

parent ce10ec93
......@@ -25,7 +25,7 @@ include ('inc/header.php'); ?>
<script>
function resizeFullImageDiv() {
var vpw = $(window).width();
var vph = $(window).height()*(.60);
var vph = $(window).height() - $('#top').outerHeight(true) - parseInt($('#image-full').css('margin-top'),10) - parseInt($('#image-full').css('margin-bottom'),10);
if (vph > <?php echo getOption('image_size'); ?>) { vph = <?php echo getOption('image_size'); ?>; }
if (vph < vpw) {
$('#image-full').css({'height': vph + 'px'});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment