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

Feature: finish spotlight on touch outside of current target #129

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

valeryvpetrov-dev
Copy link

Problem

I've seen issue #123 (from @aryandii) and decided to help you make Spotlight more functional ✨

Solution

So I added a new flag to make it possible to finish spotlight on touch outside of current target. Let's see how it looks like:

There is a listener to catch on touch outside of current target event. Finishing on touch outside is the only one usage of listener. If you want to add new Shape just create a child class and implement contains function. It can be quite complex if your shape is not primitive. So it can be not perfectly precise (and there is nothing horrible, IMHO). Round rectangle is an example of complex shape:

@TakuSemba , thanks a lot for your work. I hope this feature will improve your project and engage new developers 🤝

@valeryvpetrov-dev
Copy link
Author

valeryvpetrov-dev commented Mar 15, 2022

49c939b increases accuracy. Now touch zone is slightly bigger than target:

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

Successfully merging this pull request may close these issues.

1 participant