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);
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) {
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;