From 4d03723027e6a73a54f08497088a82c027008dfc Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 5 Jul 2018 13:44:44 +0200 Subject: [PATCH] fix #2126 @1.5 --- js/libs/fluidbook/fluidbook.menu.js | 24 +++++++++++++++++------- style/fluidbook.slideshow.less | 6 ++++-- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.menu.js b/js/libs/fluidbook/fluidbook.menu.js index d6c52cb9..9e42ce78 100644 --- a/js/libs/fluidbook/fluidbook.menu.js +++ b/js/libs/fluidbook/fluidbook.menu.js @@ -479,6 +479,7 @@ FluidbookMenu.prototype = { var forceHeight = false; var fullscreen = false; var nw, nh; + var hasCaption = true; $("#viewOverlay").css({width: ww, height: hh}); @@ -590,7 +591,6 @@ FluidbookMenu.prototype = { } else { s = w / nw; - } x = 0; y = 0; @@ -675,12 +675,11 @@ FluidbookMenu.prototype = { headerHeight = 0; thumbnailsHeight = 0; var contentHeight = h; + hasCaption = false; } - - m.find('.content').css({top: offset}); - var slideMaxHeight = h - headerHeight - thumbnailsHeight; // Remaining height that main image + caption has to fit into + m.find('.content').css({top: offset}); // Process each slide and calculate optimal height for image and slide container m.find('.fb-slideshow-slide').each(function () { @@ -689,7 +688,10 @@ FluidbookMenu.prototype = { // the contents when they don't take up the full height available $(this).css('height', slideMaxHeight); - var captionHeight = $(this).find('.fb-slideshow-slide-caption').outerHeight() || 0; + var captionHeight = 0; + if (!optimizeHeight) { + captionHeight = $(this).find('.fb-slideshow-slide-caption').outerHeight() || 0; + } // Allow image to take up whatever height is left after accounting for the caption // This is only the max-height so the image might not end up being this tall... @@ -717,11 +719,19 @@ FluidbookMenu.prototype = { } css.maxWidth = css.minWidth = css.width = w; css.maxHeight = h; - ccss.maxHeight = h - captionHeight; + if (hasCaption) { + ccss.maxHeight = h - captionHeight; + } else { + ccss.maxHeight = h; + } if (forceHeight) { css.minHeight = css.height = h; if (contentHeight === undefined) { - ccss.minHeight = ccss.height = h - captionHeight; + if (hasCaption) { + ccss.minHeight = ccss.height = h - captionHeight; + } else { + ccss.minHeight = ccss.height = h; + } } else { ccss.minHeight = ccss.height = contentHeight; } diff --git a/style/fluidbook.slideshow.less b/style/fluidbook.slideshow.less index 3c269047..4c1f7344 100644 --- a/style/fluidbook.slideshow.less +++ b/style/fluidbook.slideshow.less @@ -17,6 +17,9 @@ &-slide { position: relative; display: flex !important; + .msie & { + display: block !important; + } flex-direction: column; justify-content: center; text-align: center; @@ -32,11 +35,10 @@ } &-thumbnails { - &.fb-slideshow-nothumbs{ + &.fb-slideshow-nothumbs { display: none; } - padding: 20px 60px 40px; img { -- 2.39.5