var left = 0;
var rectinit = 'rect(0px,' + w + 'px,' + h + 'px,0px)';
- if ((animation.direction === 'left' && animation.type === 'unmask') ||
- (animation.direction === 'right' && animation.type === 'reveal')) {
+ if ((animation.direction === 'left' && animation.type === 'unmask') || (animation.direction === 'right' && animation.type === 'reveal')) {
right = 0;
- } else if ((animation.direction === 'right' && animation.type === 'unmask') ||
- (animation.direction === 'left' && animation.type === 'reveal')) {
+ } else if ((animation.direction === 'right' && animation.type === 'unmask') || (animation.direction === 'left' && animation.type === 'reveal')) {
left = w;
- } else if ((animation.direction === 'up' && animation.type === 'unmask') ||
- (animation.direction === 'down' && animation.type === 'reveal')) {
+ } else if ((animation.direction === 'up' && animation.type === 'unmask') || (animation.direction === 'down' && animation.type === 'reveal')) {
bottom = 0;
- } else if ((animation.direction === 'down' && animation.type === 'unmask') ||
- (animation.direction === 'up' && animation.type === 'reveal')) {
+ } else if ((animation.direction === 'down' && animation.type === 'unmask') || (animation.direction === 'up' && animation.type === 'reveal')) {
top = h;
}
var rect = 'rect(' + top + 'px,' + right + 'px,' + bottom + 'px,' + left + 'px);';
// init radian
var rad = Math.PI / 180;
// first circle (bigger)
- var x1 = cx + r * Math.cos(-startAngle * rad),
- x2 = cx + r * Math.cos(-endAngle * rad),
- y1 = cy + r * Math.sin(-startAngle * rad),
- y2 = cy + r * Math.sin(-endAngle * rad);
+ var x1 = cx + r * Math.cos(-startAngle * rad), x2 = cx + r * Math.cos(-endAngle * rad),
+ y1 = cy + r * Math.sin(-startAngle * rad), y2 = cy + r * Math.sin(-endAngle * rad);
// second circle / donut section
var r1 = r * pct;
- var
- x3 = cx + r1 * Math.cos(-endAngle * rad),
- y3 = cy + r1 * Math.sin(-endAngle * rad),
- x4 = cx + r1 * Math.cos(-startAngle * rad),
- y4 = cy + r1 * Math.sin(-startAngle * rad);
+ var x3 = cx + r1 * Math.cos(-endAngle * rad), y3 = cy + r1 * Math.sin(-endAngle * rad),
+ x4 = cx + r1 * Math.cos(-startAngle * rad), y4 = cy + r1 * Math.sin(-startAngle * rad);
var long = +(endAngle - startAngle > 180);
return paper.path(["M", x4, y4, "L", x1, y1, "A", r, r, 0, long, 0, x2, y2, "L", x3, y3, "A", r1, r1, 0, long, 1, x4, y4, "z"]).attr(params);
to.onUpdate = function () {
paper.clear();
sector(paper, cx, cy, radius, animation.innerradius, linkElement.angle, to.angle, {
- fill: bgc,
- stroke: 'none'
+ fill: bgc, stroke: 'none'
});
};
} else if (animation.type === 'number') {
} else if (animation.type === 'draggable') {
$(link).css('pointer-events', 'auto');
var draggable = new Draggable(link, {
- type: 'x',
- onRelease: function () {
+ type: 'x', onRelease: function () {
var d = this;
if (animation.drop === 'click') {
$('#links .link a').each(function () {
$(e).click();
}, 500);
- TweenLite.to($(link), 0.5, {x: 0, y: 0});
+ gsap.to($(link), {duration: 0.5, x: 0, y: 0});
return true;
}
});
if (repetitions > 0) {
el.css('opacity', 0);
timeline.add(gsap.to(el, {
- duration: this.fluidbook.settings.linkBlinkTime * speed,
- delay: 0.1,
- opacity: 1,
- ease: 'none'
+ duration: this.fluidbook.settings.linkBlinkTime * speed, delay: 0.1, opacity: 1, ease: 'none'
}));
d = 0;
} else {
}
for (var i = 0; i < repetitions; i++) {
timeline.add(gsap.to(el, {
- duration: this.fluidbook.settings.linkBlinkTime * speed,
- opacity: 0.5,
- ease: 'none'
+ duration: this.fluidbook.settings.linkBlinkTime * speed, opacity: 0.5, ease: 'none'
}));
timeline.add(gsap.to(el, {
- duration: this.fluidbook.settings.linkBlinkTime * speed,
- opacity: 1,
- ease: 'none'
+ duration: this.fluidbook.settings.linkBlinkTime * speed, opacity: 1, ease: 'none'
}));
}
timeline.add(gsap.to(el, {
- duration: this.fluidbook.settings.linkBlinkTime,
- delay: d,
- opacity: 0,
- onComplete: _complete
+ duration: this.fluidbook.settings.linkBlinkTime, delay: d, opacity: 0, onComplete: _complete
}));
timeline.play();
},