Guest User

Untitled

a guest
Feb 21st, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. myLayer = new Layer
  2. size: 50
  3. point: Align.center
  4. borderRadius: 4
  5. backgroundColor: "#0B8EE3"
  6.  
  7. myLayer.onTap (event) ->
  8.  
  9. # Ignores 'onTap' event if theres's a scroll or drag on the layer
  10. return if Math.abs(event.offset.x) > 4 or Math.abs(event.offset.y) > 4
  11.  
  12. # Run the event otherwise
  13. this.animate
  14. backgroundColor: "#7735F8"
Add Comment
Please, Sign In to add comment