]> _ Git - fluidbook-html5.git/commitdiff
wait #5299 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 May 2022 14:51:56 +0000 (16:51 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 30 May 2022 14:51:56 +0000 (16:51 +0200)
js/libs/fluidbook/fluidbook.links.js
style/fluidbook.less

index 4252d07e63caba0b2d2c74d485743c3695eb5608..ef72ae08c61f54f64b4bc517a2ed303bba25b3aa 100644 (file)
@@ -659,6 +659,7 @@ FluidbookLinks.prototype = {
 
         link = $(link);
         var linkElement = $(link).get(0);
+        var animatedElement = linkElement;
         if (animation.type === undefined || animation.type === '') {
             animation.type = 'none';
         }
@@ -736,16 +737,13 @@ FluidbookLinks.prototype = {
             to.y = animation.y;
 
         } else if (animation.type === 'zoomin' || animation.type === 'zoomout') {
-            var s = (100 * animation.scale) + "%";
-            from.backgroundPosition = to.backgroudPosition = animation.transformorigin;
-            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;
-                from.rotation += 0.01;
-                to.rotation = from.rotation;
-            }
+            to.display = 'block';
+            to.visibility = 'visible';
+
+            from.scale = animation.type === 'zoomin' ? 1 : animation.scale;
+            to.scale = animation.type === 'zoomout' ? 1 : animation.scale;
+            animatedElement = $(linkElement).find('img');
+            from.transformOrigin = to.transformOrigin = animation.transformorigin;
         } else if (animation.type === 'fadein') {
             from.display = 'none';
             to.display = 'block';
@@ -934,7 +932,7 @@ FluidbookLinks.prototype = {
         }
         if (usegsap) {
             to.duration = duration;
-            var a = gsap.fromTo(linkElement, from, to);
+            var a = gsap.fromTo(animatedElement, from, to);
             if (!autoStart) {
                 a.play()
                 setTimeout(function () {
index 0f392c2b028df8daeda346299eb35912cfab1fdf..30123249edb6828837adc4c826b61ca950b00bcf 100644 (file)
@@ -1535,6 +1535,7 @@ html.ios body.portrait #interface {
   z-index: 500;
   position: absolute;
   pointer-events: none;
+  overflow: hidden;
 
   &.interactive {
     pointer-events: auto;
@@ -1552,6 +1553,12 @@ html.ios body.portrait #interface {
   &[data-animation-hide] {
     display: none;
   }
+
+  img {
+    width: 100%;
+    height: 100%;
+    display: block;
+  }
 }
 
 @links-area-color: fadeout(@links-color, 70%);
@@ -3065,7 +3072,7 @@ body > input {
   }
 }
 
-@rolloverDuration:250ms;
+@rolloverDuration: 250ms;
 
 [data-rollover="upanddown"] {
   &.animaterollover {