]> _ Git - fluidbook-html5.git/commitdiff
Fix centered html5 link popup
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Apr 2015 16:29:02 +0000 (16:29 +0000)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 9 Apr 2015 16:29:02 +0000 (16:29 +0000)
js/libs/fluidbook/fluidbook.resize.js

index 8c2f5e109d93bf948bba7e51d7e7bc9a092cb31f..c54194335df50805b30c354f2af07796c0663a2e 100644 (file)
@@ -218,19 +218,12 @@ FluidbookResize.prototype = {
 
             w = parseInt($(iframe).attr('width'));
             h = parseInt($(iframe).attr('height'));
-            var s = Math.min(maxw / w, maxh / h);
 
-            $(this).css('-webkit-transform', 'scale(' + s + ')');
-            $(this).css('-moz-transform', 'scale(' + s + ')');
-            $(this).css('-ms-transform', 'scale(' + s + ')');
-            $(this).css('-o-transform', 'scale(' + s + ')');
-            $(this).css('transform', 'scale(' + s + ')');
-            $(this).css('-moz-transform-origin', '50% 0');
-            $(this).css('-webkit-transform-origin', '50% 0');
-            $(this).css('-ms-transform-origin', '50% 0');
-            $(this).css('-o-transform-origin', '50% 0');
-            $(this).css('transform-origin', '50% 0');
+            var x = (w * s) - $(window).width();
+
+            var s = Math.min(maxw / w, maxh / h);
 
+            $(this).transform({scale: s, translateX: x, origin: [0, 0]});
         });
     },
     resizePopupAudios: function () {