From db4f9590228b6e334e8610feea2058b99a129689 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 28 Oct 2014 13:54:38 +0000 Subject: [PATCH] --- js/libs/fluidbook/fluidbook.resize.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 40a1deb5..ca3c138e 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -187,16 +187,21 @@ FluidbookResize.prototype = { resizePopupVideos: function () { var maxh = this.hh - 80; $(".mview .videoContainer video").each(function () { - var w = $(window).width() - 40; + var maxw = $(window).width() - 40; var ratio = parseInt($(this).attr('data-width')) / parseInt($(this).attr('data-height')); var h = w / ratio; if (isNaN(h)) { h = maxh; } + if (isNaN(w)) { + w = maxw; + } $(this).css({ height: h, - maxHeight: maxh + width: w, + maxHeight: maxh, + maxWidth: maxw, }); }); }, -- 2.39.5