link = $(link);
var linkElement = $(link).get(0);
+ var animatedElement = linkElement;
if (animation.type === undefined || animation.type === '') {
animation.type = 'none';
}
to.y = animation.y;
} else if (animation.type === 'zoomin' || animation.type === 'zoomout') {
- var s = (100 * animation.scale) + "%";
- from.backgroundPosition = to.backgroudPosition = animation.transformorigin;
- from.backgroundSize = animation.type === 'zoomin' ? '100% 100%' : s + ' ' + s;
- to.backgroundSize = animation.type === 'zoomout' ? '100% 100%' : s + ' ' + s;
- //to.visibility = 'visible';
- if (Modernizr.firefox) {
- to.force3D = true;
- from.rotation += 0.01;
- to.rotation = from.rotation;
- }
+ to.display = 'block';
+ to.visibility = 'visible';
+
+ from.scale = animation.type === 'zoomin' ? 1 : animation.scale;
+ to.scale = animation.type === 'zoomout' ? 1 : animation.scale;
+ animatedElement = $(linkElement).find('img');
+ from.transformOrigin = to.transformOrigin = animation.transformorigin;
} else if (animation.type === 'fadein') {
from.display = 'none';
to.display = 'block';
}
if (usegsap) {
to.duration = duration;
- var a = gsap.fromTo(linkElement, from, to);
+ var a = gsap.fromTo(animatedElement, from, to);
if (!autoStart) {
a.play()
setTimeout(function () {
z-index: 500;
position: absolute;
pointer-events: none;
+ overflow: hidden;
&.interactive {
pointer-events: auto;
&[data-animation-hide] {
display: none;
}
+
+ img {
+ width: 100%;
+ height: 100%;
+ display: block;
+ }
}
@links-area-color: fadeout(@links-color, 70%);
}
}
-@rolloverDuration:250ms;
+@rolloverDuration: 250ms;
[data-rollover="upanddown"] {
&.animaterollover {