From: Vincent Vanwaelscappel Date: Thu, 22 Apr 2021 19:03:48 +0000 (+0200) Subject: wait #4413 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=bcb5e55e5ac54e3dc406cf037879c6a5a4e10b38;p=fluidbook-html5.git wait #4413 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index a7a37386..649f1c9c 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -196,7 +196,7 @@ FluidbookLinks.prototype = { if (mode === 'exclusiveshow' || mode === 'shownext' || mode === 'shownextcycle' || mode === 'pickrandom') { var selector = 'div.link[data-hidden="1"].show'; - $.each(showid, function (k,id) { + $.each(showid, function (k, id) { selector += ':not([data-id$="' + id + '"])'; }); $(selector).each(function () { @@ -206,7 +206,7 @@ FluidbookLinks.prototype = { var close = $(this).data('showclose'); console.log(showid); - $.each(showid, function (k,id) { + $.each(showid, function (k, id) { $('div.link[data-id$="' + id + '"]').each(function () { var l = this; if (close !== 'none') { @@ -561,6 +561,17 @@ FluidbookLinks.prototype = { from.y = 0; to.x = animation.x; to.y = animation.y; + + } else if (animation.type === 'zoomin' || animation.type === 'zoomout') { + var s = (100 * animation.scale) + "%"; + from.backgroundPosition = to.backgroudPosition = '50% 50%'; + from.backgroundSize = animation.type === 'zoomin' ? '100% 100%' : s + ' ' + s; + to.backgroundSize = animation.type === 'zoomout' ? '100% 100%' : s + ' ' + s; + if(Modernizr.firefox) { + to.force3D=true; + to.rotation = 0.01; + from.rotation = 0.01; + } } else if (animation.type === 'fadein') { from.display = 'none'; to.display = 'block'; @@ -721,6 +732,7 @@ FluidbookLinks.prototype = { if (from.display !== undefined && from.display === 'none') { link.hide(); } + console.log(from, to); if (tweenmax) { TweenMax.fromTo(linkElement, duration, from, to); }