]> _ Git - fluidbook-html5.git/commitdiff
wait #4413 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 22 Apr 2021 19:03:48 +0000 (21:03 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 22 Apr 2021 19:03:48 +0000 (21:03 +0200)
js/libs/fluidbook/fluidbook.links.js

index a7a37386680ceb6ced0002b74d6df45de528591f..649f1c9c9d4d969f11883cc9e7b686dd5130f68b 100644 (file)
@@ -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);
         }