From adaf1f8a8ec34e1f7c9e03a6ceafb586625a5318 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 9 Apr 2015 16:29:02 +0000 Subject: [PATCH] Fix centered html5 link popup --- js/libs/fluidbook/fluidbook.resize.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) 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 () { -- 2.39.5