Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myLayer = new Layer
- size: 50
- point: Align.center
- borderRadius: 4
- backgroundColor: "#0B8EE3"
- myLayer.onTap (event) ->
- # Ignores 'onTap' event if theres's a scroll or drag on the layer
- return if Math.abs(event.offset.x) > 4 or Math.abs(event.offset.y) > 4
- # Run the event otherwise
- this.animate
- backgroundColor: "#7735F8"
Add Comment
Please, Sign In to add comment