Skip to content

Instantly share code, notes, and snippets.

@mhkt
Created February 6, 2015 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhkt/3c41c4f65c08c2abad8e to your computer and use it in GitHub Desktop.
Save mhkt/3c41c4f65c08c2abad8e to your computer and use it in GitHub Desktop.
Return zoom animation in Framer photo thingy
zoomInAnimationFunc = (layerName) ->
zoomIn = new Animation
layer: layerName
properties:
x: 0
y: 325
height: 640
width: Screen.width
time: 0.2
curve: "spring(300,23,0)"
zoomIn.start()
return zoomIn
pic1.on Events.Click, ->
banimation = zoomInAnimationFunc(this)
this.on Events.Click, ->
banimation.start()
backBtn.on Events.Click, ->
banimation.reverse().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment