Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
EventHub.listen('no-files-hide', () => {
lottie.destroy('no_files_anim')
})
EventHub.listen('no-search-hide', () => {
lottie.destroy('no_search_anim')
})
const memphis = (container) => {
lottie.loadAnimation({
container: container,
renderer: 'svg',
rendererSettings: {
className: 'absolute-player'
},
loop: false,
autoplay: true,
animationData: animationData,
onComplete: lottie.destroy()
})
}
export default memphis
EventHub.listen('ajax-error-hide', () => {
lottie.destroy('ajax_error_anim')
})
lottieRender = () => {
lottie.destroy()
let animation = lottie.loadAnimation({
container: document.getElementById("preview"),
renderer: "svg",
loop: true,
autoplay:true,
animationData: this.state.data,
});
if(this.state.paused) animation.goToAndStop(this.state.currentFrameTime,true)
animation.addEventListener('enterFrame',this.updateCurrentFrame)
}
EventHub.listen('loading-files-hide', () => {
setTimeout(lottie.destroy('loading_files_anim'), 50)
})
componentWillUnmount() {
lottie.destroy();
}