]> _ Git - fluidbook-html5.git/commitdiff
Fix multimedia scale
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Jun 2015 09:39:39 +0000 (09:39 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Jun 2015 09:39:39 +0000 (09:39 +0000)
js/libs/fluidbook/fluidbook.resize.js

index 178ecfd65ae43ca55d5c93190a241448378f3850..2abd2aebaa4eacdbf8727cd4591dce97d5fae7c6 100644 (file)
@@ -220,9 +220,9 @@ FluidbookResize.prototype = {
             h = parseInt($(iframe).attr('height'));
 
             var s = Math.min(maxw / w, maxh / h);
-            var x = (w * s) - $(window).width();
-            
-            $(this).transform({scale: s, translateX: x, origin: [0, 0]});
+            var x = ( $(window).width() - (w * s)  ) / 2;
+
+            $(this).transform({translateX: x + 'px', scale: [s, s], origin: [0, 0]}).css('text-align', 'left');
         });
     },
     resizePopupAudios: function () {