Skip to content

Instantly share code, notes, and snippets.

@antonkartashov
Last active January 20, 2016 16:22
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 antonkartashov/e1e00e6d9f128184989e to your computer and use it in GitHub Desktop.
Save antonkartashov/e1e00e6d9f128184989e to your computer and use it in GitHub Desktop.
touchDown = false
tapPosition =
x: 0
y: 0
layerA.on Events.TouchStart, (e) ->
touchDown = true
tapPosition.x = Events.touchEvent(e).clientX
tapPosition.y = Events.touchEvent(e).clientY
layerA.on Events.TouchEnd, (e) ->
touchDown = false
if tapPosition.x == Events.touchEvent(e).clientX and
tapPosition.y == Events.touchEvent(e).clientY
# Action on Tap
layerA.on Events.DragEnd, ->
touchDown = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment