Skip to content

Instantly share code, notes, and snippets.

@antonkartashov
Last active October 26, 2015 22:03
Show Gist options
  • Save antonkartashov/3df219116d2b90b68d55 to your computer and use it in GitHub Desktop.
Save antonkartashov/3df219116d2b90b68d55 to your computer and use it in GitHub Desktop.
pos = []
touchDown = false
card.on Events.TouchStart, (e) ->
touchDown = true
pos.x = Events.touchEvent(e).clientX
pos.y = Events.touchEvent(e).clientY
card.on Events.TouchEnd, (e) ->
touchDown = false
if pos.x is Events.touchEvent(e).clientX and
pos.y is Events.touchEvent(e).clientY
card.animate properties: { y: 0 }, time: .05
card.on Events.DragEnd, ->
touchDown = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment