]> _ Git - fluidbook-html5.git/commitdiff
(no commit message)
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 28 Oct 2014 13:54:38 +0000 (13:54 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 28 Oct 2014 13:54:38 +0000 (13:54 +0000)
js/libs/fluidbook/fluidbook.resize.js

index 40a1deb55b663e4c136df683e10b711cc183477d..ca3c138e66ee6e333b8fa9074127aecacb2b4212 100644 (file)
@@ -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,
                        });
                });
        },