Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
hide () {
if (this.anims.show) { this.anims.show.pause(); delete this.anims.show }
if (this.anims.offset) { this.anims.offset.pause(); delete this.anims.offset }
const ty = anime.getValue(this.refs.base, 'translateY')
const r = anime.getValue(this.refs.base, 'rotate')
this.anims.hide = anime({
targets: this.refs.base,
translateY: ty,
translateX: -60,
opacity: 0,
rotate: [r, 0],
// scale: 0,
duration: 400,
easing: 'easeInOutQuad'
})
return this.anims.hide.finished
}
hide () {
if (this.anims.show) { this.anims.show.pause(); delete this.anims.show }
if (this.anims.offset) { this.anims.offset.pause(); delete this.anims.offset }
const ty = anime.getValue(this.refs.base, 'translateY')
const r = anime.getValue(this.refs.base, 'rotate')
this.anims.hide = anime({
targets: this.refs.base,
translateY: ty,
translateX: -60,
opacity: 0,
rotate: [r, 0],
// scale: 0,
duration: 400,
easing: 'easeInOutQuad'
})
return this.anims.hide.finished
}
getOffset() {
return parseInt(anime.getValue(this.element, this.instance.axis), 10)
}