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

Snap only when close to center #3

Closed
night-wielder opened this issue Nov 20, 2019 · 3 comments
Closed

Snap only when close to center #3

night-wielder opened this issue Nov 20, 2019 · 3 comments

Comments

@night-wielder
Copy link

Hello! THIS IS AN AMAZING LIBRARY, THANK YOU SO MUCH!
I want something like this:

  1. Snap to the sides when close to them.
  2. Snap to the center when close to it.
  3. If both are far, DON'T SNAP.
    I can do the former two things. But how do I accomplish the third thing?
    Thanks!
@aliyigitbireroglu
Copy link
Owner

Hello! You are very welcome and I am glad to hear that😃

That is a very good suggestion. At the moment, it would be unnecessarily difficult and messy to do so but I believe it is very easy to implement to the library. I will push a new update in the next 1-2 days specifically for this👍🏻

@night-wielder
Copy link
Author

That would be awesome! Thank you so much!

@aliyigitbireroglu
Copy link
Owner

Hi again. The new update introduces

minSnapDistance

and as explained: Use this value to set the minimum distance in pixels required for the snapping to occur. If no [SnapTarget] is found that is closer to the [uiChild] than this value, the snapping will not occur.

I hope this will solve your issue👍🏻

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