Logo

GitLab

Sign in

Repower / Repower_CHosoWebApi

  • Back to Group
  • Project
  • Activity
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues
  • Merge Requests 0
  • Labels
  • Wiki
  • Repower_CHosoWebApi
  • src
  • components
  • Activation
  • animation.js
  • Sketchin updates
    e3036ae7
    marco.colombi authored
    2017-11-29 17:37:37 +0100  
    Browse File ยป
animation.js 457 Bytes
Edit Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
import { TweenMax, Elastic } from 'gsap'

const duration=3

export default{
	show(target,cb){
		return TweenMax
			.from(target,duration,{
				opacity:0,
				height:0,
				onComplete(){
					cb()
				},
				ease: Elastic.easeOut.config(0.25,1)
			})
	},
	hide(target,cb){
		return TweenMax
			.to(target,duration,{
				opacity:0,
				height:0,
				onComplete(){
					cb()
				},
				ease: Elastic.easeOut.config(0.25,1)
			})
	}
}