]> _ Git - fluidbook-html5.git/commitdiff
fix #2126 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 5 Jul 2018 11:44:44 +0000 (13:44 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 5 Jul 2018 11:44:44 +0000 (13:44 +0200)
js/libs/fluidbook/fluidbook.menu.js
style/fluidbook.slideshow.less

index d6c52cb91dfb877f2d440f2763b695cc57e47934..9e42ce78e8fc12db83fd8c1c8ccc01c000330e05 100644 (file)
@@ -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;
             }
index 3c269047002ee44501bc7209a72a51e91bb13a46..4c1f73447ddf9cfa8da1c063beea78b2e192de03 100644 (file)
@@ -17,6 +17,9 @@
        &-slide {
                position: relative;
                display: flex !important;
+               .msie & {
+                       display: block !important;
+               }
                flex-direction: column;
                justify-content: center;
                text-align: center;
        }
 
        &-thumbnails {
-               &.fb-slideshow-nothumbs{
+               &.fb-slideshow-nothumbs {
                        display: none;
                }
 
-
                padding: 20px 60px 40px;
 
                img {