Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a snap effect? #38

Open
max1020 opened this issue Aug 6, 2016 · 1 comment
Open

How to create a snap effect? #38

max1020 opened this issue Aug 6, 2016 · 1 comment

Comments

@max1020
Copy link

max1020 commented Aug 6, 2016

Thanks for this great contribution. I make a small card game - the player draws cards and drags them to the bottom of the screen where there are a couple of empty card spots. Picking the card and dragging them works great.

How can I add a snap effect to the empty card spots? Do I have to create (another?) touchmove eventlistener? Any general advice is appreciated.

@yozef
Copy link

yozef commented Feb 9, 2017

I'd use com.animecyc.Animator to animate and stop the location on end event of the draggableView to a specific location with easing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants