From: Vincent Vanwaelscappel Date: Thu, 9 Apr 2015 16:29:02 +0000 (+0000) Subject: Fix centered html5 link popup X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=adaf1f8a8ec34e1f7c9e03a6ceafb586625a5318;p=fluidbook-html5.git Fix centered html5 link popup --- diff --git a/js/libs/fluidbook/fluidbook.resize.js b/js/libs/fluidbook/fluidbook.resize.js index 8c2f5e10..c5419433 100644 --- a/js/libs/fluidbook/fluidbook.resize.js +++ b/js/libs/fluidbook/fluidbook.resize.js @@ -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 () {