]> _ Git - fluidbook-html5.git/commitdiff
wip #4470 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 17 May 2021 14:32:16 +0000 (16:32 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 17 May 2021 14:32:16 +0000 (16:32 +0200)
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/fluidbook.mobilefirst.js
style/mobilefirst.less

index 383cecffe0bfdc9567767f14b87d0b8c59c91b8e..99edd62a97e88606620ccd19b8a7a8a57bd2d159 100644 (file)
@@ -529,7 +529,6 @@ FluidbookLinks.prototype = {
         var duration = 0.5;
         var tweenmax = true;
 
-
         animation = $.extend({}, globalDefault, defaultParams, animation);
 
         if (animation.duration !== undefined) {
@@ -550,6 +549,7 @@ FluidbookLinks.prototype = {
         if (animation.type === 'translatefrom') {
             from.display = 'none';
             to.display = 'block';
+            to.visibility='visible';
 
             from.x = animation.x;
             from.y = animation.y;
@@ -559,6 +559,7 @@ FluidbookLinks.prototype = {
         } else if (animation.type === 'translate') {
             from.display = 'none';
             to.display = 'block';
+            to.visibility='visible';
             from.x = 0;
             from.y = 0;
             to.x = animation.x;
@@ -569,6 +570,7 @@ FluidbookLinks.prototype = {
             from.backgroundPosition = to.backgroudPosition = '50% 50%';
             from.backgroundSize = animation.type === 'zoomin' ? '100% 100%' : s + ' ' + s;
             to.backgroundSize = animation.type === 'zoomout' ? '100% 100%' : s + ' ' + s;
+            to.visibility='visible';
             if (Modernizr.firefox) {
                 to.force3D = true;
                 to.rotation = 0.01;
@@ -577,6 +579,7 @@ FluidbookLinks.prototype = {
         } else if (animation.type === 'fadein') {
             from.display = 'none';
             to.display = 'block';
+            to.visibility='visible';
             from.opacity = 0;
             to.opacity = 1;
         } else if (animation.type === 'fadeout') {
@@ -586,6 +589,7 @@ FluidbookLinks.prototype = {
             if (animation.type === 'reveal') {
                 from.display = 'none';
                 to.display = 'block';
+                to.visibility='visible';
             }
 
             var top = 0;
@@ -735,7 +739,6 @@ FluidbookLinks.prototype = {
             link.hide();
         }
         if (tweenmax) {
-            console.log(from, to);
             TweenMax.fromTo(linkElement, duration, from, to);
         }
         this.fluidbook.networkControl.pause((to.delay + duration + 0.5) * 1000);
index 8220a85923b0ab09f8a3be20f63f8b2ac2f56bda..7944e006ed592bfe91b91227ef0b302b03fc5a46 100644 (file)
@@ -71,7 +71,11 @@ FluidbookMobileFirst.prototype = {
         var delay = 800;
         $("#links .link:not(.revealed):visible, .clinks [data-animations]:not(.revealed)").each(function () {
             var rect = $(this).get(0).getBoundingClientRect();
+            if (rect.top === 0 && rect.left === 0 && rect.width === 0 && rect.height === 0) {
+                return;
+            }
             if (rect.top < $this.fluidbook.resize.hh) {
+                console.log($(this).attr('id'), rect.top, $this.fluidbook.resize.hh);
                 $(this).addClass('revealed');
                 if ($(this).find('a.displayArea').length > 0) {
                     $this.fluidbook.links.animateLink(this, delay);
@@ -175,7 +179,7 @@ FluidbookMobileFirst.prototype = {
     },
 
     refreshFooterNavigation: function (page) {
-        if(!this.enabled){
+        if (!this.enabled) {
             return;
         }
         if (page === undefined) {
index 1d5e35757854e865150ddd24d31b4b9d58e8ab9f..e3dcb10a5aa181116a5acd06b066d678dd25ba90 100644 (file)
       }
     }
 
+    .link.contentLink[data-animation-hide] {
+      display: block;
+      visibility: hidden;
+    }
 
     #helpView .interface {
       display: block;
       }
     }
   }
+
   .mview[data-menu="index"] {
     .content {
       overflow-x: auto;
     }
-    .ps__rail-x{
+
+    .ps__rail-x {
       display: block;
     }
   }
     opacity: 0;
     transition: opacity 250ms;
 
-    .thumb .number{
-      padding-top:10px;
+    .thumb .number {
+      padding-top: 10px;
     }
 
     .here {