]> _ Git - fluidbook-html5.git/commitdiff
wip #7650 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 18 Jul 2025 14:56:09 +0000 (16:56 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 18 Jul 2025 14:56:09 +0000 (16:56 +0200)
js/libs/fluidbook/fluidbook.links.animations.js
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/fluidbook.mobilefirst.js
style/cart.less
style/links.less

index dbe1239f95e8d55e35496762d83006286d724edc..bef8a2d99687751c8bfa2e6238be433f3cd17d3b 100644 (file)
@@ -221,6 +221,16 @@ FluidbookLinksAnimations.prototype = {
                 from.opacity = css.opacity;
             }
             to.opacity = 0;
+        } else if (animation.type === 'keephidden') {
+            from.display = 'none';
+            to.display = 'block';
+            to.visibility = 'visible';
+            if (css.opacity !== undefined) {
+                from.opacity = css.opacity;
+            } else {
+                from.opacity = 0;
+            }
+            to.opacity = 0;
         } else if (animation.type === "unmask" || animation.type === 'reveal') {
             if (animation.type === 'reveal') {
                 from.display = 'none';
index 1ee8a1f4a61d4248fcfde25e60410a3160e0d93a..94dbe385eb3f5b046eb802aff266f9e85b22dc82 100644 (file)
@@ -840,7 +840,7 @@ FluidbookLinks.prototype = {
         var animateBookmarks = (this.fluidbook.settings.bookmarkBlinkOnPageChange == true);
 
         var $this = this;
-        var links = $(container).find(".link a.displayArea");
+        var links = $(container).find(".link a[data-animation]");
 
         if (!this.fluidbook.mobilefirst.enabled) {
             $(links).each(function () {
@@ -930,8 +930,8 @@ FluidbookLinks.prototype = {
     },
 
     animateLink: function (link, additionalDelay) {
-        if (!$(link).is('.displayArea')) {
-            link = $(link).find('.displayArea');
+        if (!$(link).is('[data-animation]')) {
+            link = $(link).find('[data-animation]');
         }
         if (additionalDelay === undefined) {
             additionalDelay = 0;
index 9dcf169292608a55cc57530712c5b9b5ebcde5bf..e510306da1b562ff9598884b16afa77a883a87e9 100644 (file)
@@ -77,7 +77,7 @@ FluidbookMobileFirst.prototype = {
             }
             if (rect.top < $this.fluidbook.resize.hh) {
                 $(this).addClass('revealed');
-                if ($(this).find('a.displayArea').length > 0) {
+                if ($(this).find('a[data-display-area!="none"]').length > 0) {
                     $this.fluidbook.links.animateLink(this, delay);
                 } else if ($(this).is('.multimedia.notinteractive')) {
                     var url = $(this).find('iframe').attr('src');
index adf340d44047c39f8c27786521aa081924689621..1a536ce21524c74eff48e0bb66742d2841c2ad51 100644 (file)
@@ -123,7 +123,7 @@ a[data-cart-ref] {
       }
     }
 
-    &.displayArea:hover {
+    &[data-display-area="fill"]:hover {
       background-color: @links-area-color;
       mix-blend-mode: multiply;
 
index fb9074f71f49100c043c04c0e40ec073b9e98fad..1e332f30afc8ce307c39b3dbc4a423e7053e3b71 100644 (file)
   display: block;
   background-color: transparent;
 
-  &.displayArea {
+  &[data-display-area="fill"]{
     -webkit-tap-highlight-color: @links-area-color;
     background-color: fadeout(@links-color, 99.999%);
     border-radius: unit(@links-rounded-corners*2, px);