]> _ Git - fluidbook-html5.git/commitdiff
wait #5332 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Jun 2022 16:58:43 +0000 (18:58 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Jun 2022 16:58:43 +0000 (18:58 +0200)
js/libs/fluidbook/fluidbook.links.js

index 0612c7fd5d47452b26d480c8726eb0eabf8f36d1..b9012fb768f7f06d0083bed0a184d2b8f2dde83f 100644 (file)
@@ -799,7 +799,13 @@ FluidbookLinks.prototype = {
                 from.clip = rect;
             }
         } else if (animation.type === 'pie') {
-            defaultParams = {startangle: '0', direction: 'clockwise', size: 'outside', innerradius: '0'};
+            defaultParams = {
+                startangle: '0',
+                direction: 'clockwise',
+                size: 'outside',
+                innerradius: '0',
+                hideonstart: '0'
+            };
             animation = $.extend({}, globalDefault, defaultParams, animation);
             animation.startangle = parseFloat(animation.startangle);
             animation.innerradius = parseFloat(animation.innerradius);
@@ -840,9 +846,11 @@ FluidbookLinks.prototype = {
             var paper = new Raphael(link.attr('id'), w, h);
             var bgc = link.attr('data-color');
             to.angle = animation.startangle + 360;
-            to.onStart = function () {
-                link.css('background-color', "transparent");
-            };
+            if (animation.hideonstart == '1') {
+                to.onStart = function () {
+                    link.css('background-color', "transparent");
+                };
+            }
             to.onUpdate = function () {
                 paper.clear();
                 if (Math.abs(linkElement.angle - from.angle) < 2) {
@@ -855,7 +863,7 @@ FluidbookLinks.prototype = {
                 sector(paper, cx, cy, radius, animation.innerradius, linkElement.angle, to.angle, {
                     fill: bgc, stroke: 'none'
                 });
-
+                link.css('background-color', "transparent");
             };
         } else if (animation.type === 'number') {
             usegsap = false;