Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (!this.isShowing) {
this.isShowing = true;
this.currentItem = item;
this.topImg = this.$refs.gallery.scrollTop;
let deltaW = this.rects.first.left - this.rects.last.left;
let deltaH = this.rects.first.top - this.rects.last.top;
let deltaS = (this.rects.last.width - 30) / this.rects.first.width;
TweenMax.to(elImg, 0.3, {
x: -deltaW,
y: -deltaH,
scale: deltaS,
transformOrigin: "0 0",
zIndex: 1000,
ease: Sine.easeOut
});
} else {
TweenMax.to(elImg, 0.3, {
x: 0,
y: 0,
scale: 1,
transformOrigin: "0 0",
zIndex: 0,
ease: Sine.easeIn
});
this.isShowing = false;
this.currentItem = null;
}
} else {
this.isShowing = true;
opacity: 1,
scale: 1,
ease: Sine.easeOut,
}
);
TweenMax.staggerFromTo(
menuEl.childNodes,
0.45,
{
opacity: 0,
},
{
delay: 0.1,
opacity: 1,
ease: Sine.easeOut,
},
0.04
);
}
opacity: 1,
scale: 1,
ease: Sine.easeOut,
}
);
TweenMax.staggerFromTo(
menuEl.childNodes,
0.45,
{
opacity: 0,
},
{
delay: 0.1,
opacity: 1,
ease: Sine.easeOut,
},
0.04
);
}
render() {
transformOrigin: "50% 50% 0",
rotationY: 0,
ease: Elastic.easeOut.config(1, 0.4)
},
0.02,
"start+=0.3"
);
tl.staggerFromTo(
desc.childNodes,
1.5,
{
opacity: 0
},
{
opacity: 1,
ease: Sine.easeOut
},
0.008,
"start+=0.6"
);
})
}
enter(el, done) {
TweenMax.fromTo(
el,
0.2,
{
opacity: 0,
scale: 0
},
{
opacity: 1,
scale: 1,
ease: Sine.easeOut
}
)
TweenMax.staggerFromTo(
el.childNodes,
0.45,
{
opacity: 0
},
{
delay: 0.1,
opacity: 1,
ease: Sine.easeOut
},
0.04
)
done()
{
opacity: 1,
scale: 1,
ease: Sine.easeOut
}
);
TweenMax.staggerFromTo(
el.element.childNodes,
0.45,
{
opacity: 0
},
{
delay: 0.1,
opacity: 1,
ease: Sine.easeOut
},
0.04
);
}
}
x: 7,
scaleX: 3,
transformOrigin: '50% 100%',
ease: Expo.easeOut
},
'start'
);
tl.fromTo(
'.saveinfo',
0.5,
{
autoAlpha: 0
},
{
autoAlpha: 1,
ease: Sine.easeOut
},
'start'
);
tl.to(
'.saveinfo',
0.4,
{
autoAlpha: 0,
ease: Expo.easeIn
},
'start+=1'
);
return tl;
}
removeAnimation() {
leaveAnim = (utils) => {
const { id } = this.props;
return new TimelineMax()
.to(utils.target, 0.5, {
scale: 0,
ease: Sine.easeOut,
onComplete: utils.options.callback,
}, (4 - id) * 0.7);
}
TweenMax.set(menuEl.childNodes, {
opacity: 0,
});
TweenMax.fromTo(
menuEl,
0.2,
{
opacity: 0,
scale: 0,
},
{
opacity: 1,
scale: 1,
ease: Sine.easeOut,
}
);
TweenMax.staggerFromTo(
menuEl.childNodes,
0.45,
{
opacity: 0,
},
{
delay: 0.1,
opacity: 1,
ease: Sine.easeOut,
},
0.04
);
openMenu() {
TweenMax.to(this.threeDots.first.nativeElement, 0.2, {
x: 18,
ease: Sine.easeOut
});
TweenMax.to(this.threeDots.last.nativeElement, 0.2, {
x: -18,
ease: Sine.easeOut
});
TweenMax.staggerTo(
[
this.threeDots.first.nativeElement,
this.threeDots.middle.nativeElement,
this.threeDots.last.nativeElement
],
0.2,
{
fill: '#7eebe6',
ease: Sine.easeOut
},
0.04
);
}