]> _ Git - fluidbook-html5.git/commitdiff
fix #3620 @3
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 28 Apr 2020 16:38:35 +0000 (18:38 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 28 Apr 2020 16:38:35 +0000 (18:38 +0200)
js/libs/fluidbook/fluidbook.links.js
style/fluidbook.less

index e2a1e2cd99e55b11cf82e0e3d836b5cffed20326..1dd477e4b1a95dd82e1140508ab23904990d70ed 100644 (file)
@@ -289,7 +289,8 @@ FluidbookLinks.prototype = {
         if (animation.type === undefined || animation.type === '') {
             return;
         }
-        var defaultParams;
+        var defaultParams = {};
+        var globalDefault = {zindex: 0};
         var w = parseFloat(link.css('width'));
         var cx = w / 2;
         var h = parseFloat(link.css('height'));
@@ -298,16 +299,19 @@ FluidbookLinks.prototype = {
         var to = {};
         var duration = 0.5;
         var tweenmax = true;
+
+        animation = $.extend({}, globalDefault, defaultParams, animation);
+
         if (animation.duration !== undefined) {
             duration = parseFloat(animation.duration);
         }
+        var css = {};
 
         if (animation.ease == undefined) {
             animation.ease = "Power1.easeOut";
         }
         to.ease = animation.ease;
 
-
         if (animation.delay !== undefined) {
             to.delay = parseFloat(animation.delay);
         }
@@ -348,7 +352,7 @@ FluidbookLinks.prototype = {
             }
         } else if (animation.type === 'pie') {
             defaultParams = {startAngle: '0', direction: 'clockwise', size: 'outside', innerRadius: '0'};
-            animation = $.extend({}, defaultParams, animation);
+            animation = $.extend({}, globalDefault, defaultParams, animation);
             animation.startAngle = parseFloat(animation.startAngle);
             animation.innerRadius = parseFloat(animation.innerRadius);
             if (animation.direction === 'clockwise') {
@@ -417,7 +421,7 @@ FluidbookLinks.prototype = {
                 suffix: '',
                 scale: 1,
             };
-            animation = $.extend({}, defaultParams, animation);
+            animation = $.extend({}, globalDefault, defaultParams, animation);
             animation.startValue = parseFloat(animation.startValue.replace(/,/, '.'));
             animation.decimalDigitNumber = parseInt(animation.decimalDigitNumber);
             animation.letterSpacing = parseFloat(animation.letterSpacing);
@@ -439,14 +443,13 @@ FluidbookLinks.prototype = {
                 }
             };
 
-            var css = {
+            css = {
                 textAlign: animation.align,
                 letterSpacing: animation.letterSpacing,
                 opacity: 0,
                 transform: "scale(" + animation.scale + ")",
             }
 
-            link.css(css);
             var value = parseFloat(link.text().replace(/,/, '.'));
             link.text('');
             var countup = new CountUp(link.attr('id'), value, options);
@@ -455,6 +458,9 @@ FluidbookLinks.prototype = {
                 countup.start();
             }, to.delay * 1000);
         }
+        css = $.extend({zIndex: 500 + parseInt(animation.zindex)}, css);
+        console.log(css);
+        link.css(css);
         link.show();
         if (tweenmax) {
             TweenMax.fromTo(linkElement, duration, from, to);
index edaa642cedfb705f1d0a07c77798525a1529a167..ee65be6a2a5c8c2706b4280ba4fe2506e7e0dc51 100644 (file)
@@ -1254,7 +1254,7 @@ html.ios body.portrait #interface {
 }
 
 .link.contentLink {
-  z-index: 0 !important;
+  z-index: 500;
   position: absolute;
   pointer-events: none;