animation.type = 'none';
}
var defaultParams = {};
- var globalDefault = {x: 0, y: 0};
+ var globalDefault = {x: 0, y: 0, yoyo: 0, repeat: 0};
var w = parseFloat(link.css('width'));
var cx = w / 2;
var h = parseFloat(link.css('height'));
var duration = 0.5;
var tweenmax = true;
+
animation = $.extend({}, globalDefault, defaultParams, animation);
if (animation.duration !== undefined) {
duration = parseFloat(animation.duration);
}
+ to.yoyo = animation.yoyo === true || animation.yoyo === 1 || animation.yoyo === '1' || animation.yoyo === 'true';
+ to.repeat = parseInt(animation.repeat);
var css = {};
if (animation.ease === undefined) {
from.backgroundPosition = to.backgroudPosition = '50% 50%';
from.backgroundSize = animation.type === 'zoomin' ? '100% 100%' : s + ' ' + s;
to.backgroundSize = animation.type === 'zoomout' ? '100% 100%' : s + ' ' + s;
- if(Modernizr.firefox) {
- to.force3D=true;
+ if (Modernizr.firefox) {
+ to.force3D = true;
to.rotation = 0.01;
from.rotation = 0.01;
}
link.hide();
}
if (tweenmax) {
+ console.log(from, to);
TweenMax.fromTo(linkElement, duration, from, to);
}
this.fluidbook.networkControl.pause((to.delay + duration + 0.5) * 1000);