]> _ Git - fluidbook-html5.git/commitdiff
wait #5973 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 31 May 2023 11:37:21 +0000 (13:37 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 31 May 2023 11:37:21 +0000 (13:37 +0200)
js/libs/fluidbook/fluidbook.links.js
style/fluidbook.less

index 107bdf5aa400e1d83a531b6ac71cf31f1c2d1561..33c40dd7bf57093034bcbc6d27d1dae08fc68645 100644 (file)
@@ -233,6 +233,7 @@ FluidbookLinks.prototype = {
                 $this.showLinkAnimating = false;
             }, 1000);
             var mode = $(this).data('showmode');
+            var transition = $(this).data('showtransition') ? $(this).data('showtransition') : 'fadein';
             var ids = $(this).data('showid').toString().split(',');
 
             if (mode === 'hide') {
@@ -295,8 +296,8 @@ FluidbookLinks.prototype = {
                 showid = ids;
             }
 
+            let showTimeout = 10;
             if (mode === 'exclusiveshow' || mode === 'shownext' || mode === 'shownextcycle' || mode === 'showprev' || mode === 'showprevcycle' || mode === 'pickrandom') {
-
                 var selector = 'div.link[data-hidden="1"].show';
                 var hide = [];
                 // Only hide links that are in the list
@@ -321,11 +322,17 @@ FluidbookLinks.prototype = {
                 if (mode === 'exclusiveshow') {
                     hide = 'all';
                 }
+
+
+                var to=900;
+                showTimeout = (transition === 'fadeoutin') ? to : 10;
+                let hideTimeout = (transition === 'fadeoutin') ? 10 : to;
+
                 $.each(showid, function (k, id) {
                     selector += ':not([data-id$="' + id + '"])';
                 });
                 $(selector).each(function () {
-                    var timeout = (mode === 'shownext' || mode === 'shownextcycle' || mode === 'showprev' || mode === 'showprevcycle') ? 900 : 0;
+                    let timeout = hideTimeout;
                     if ($(selector).is('[data-animation-hide]')) {
                         timeout = 0;
                     }
@@ -337,9 +344,13 @@ FluidbookLinks.prototype = {
                         $this.hidePlacedLink(this, timeout);
                     }
                 });
+
+
             }
 
             var close = $(this).data('showclose');
+
+
             $.each(showid, function (k, id) {
                 $('div.link[data-id$="' + id + '"]').each(function () {
                     var l = this;
@@ -374,7 +385,7 @@ FluidbookLinks.prototype = {
                         }
                         $(l).addClass('show');
                         $this.updateAttachedLinks();
-                    }, 10);
+                    }, showTimeout);
                 });
             });
 
@@ -567,7 +578,7 @@ FluidbookLinks.prototype = {
             setTimeout(function () {
                 $(p).hide();
                 $this.updateAttachedLinks();
-            }, 500);
+            }, 2000);
             $this.updateAttachedLinks();
         }, timeout);
     },
index 1c7aeae698e5df0df7f68c396932c4616eab5010..310f4834120e2fc571fe038d23afc39fc80552ef 100644 (file)
@@ -1461,7 +1461,7 @@ html.ios body.portrait #interface {
 
 .link {
   &[data-hidden="1"] {
-    transition: opacity 750ms;
+    transition: opacity 750ms, visibility 750ms;
     visibility: hidden;
     opacity: 0;