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

feat(follow): Add option to follow thumbstick #160

Merged
merged 5 commits into from
Feb 24, 2021
Merged

feat(follow): Add option to follow thumbstick #160

merged 5 commits into from
Feb 24, 2021

Conversation

emepetres
Copy link
Contributor

When follow option is set to true, the joystick follows the pointer when it reaches its border.

This is meant to improve usability on touch screens, when the user doesn't have the feedback of getting out the joystick zone.

@yoannmoinet
Copy link
Owner

Hey thank you for this, I'll have a look.

Copy link
Owner

@yoannmoinet yoannmoinet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested it, the movement is great and all, works exactly as expected.
Well done. (Even tested with the square shape, and it's working 💯)

But there seems to be an offset somewhere as soon as I reach the border of the back piece.
Not sure where it is coming from.

Screen.Recording.2021-02-22.at.11.00.04.mov

README.md Outdated Show resolved Hide resolved
@emepetres
Copy link
Contributor Author

Yep the offset is weird, in my project I set the zone to a specific div and it works as expected. Must be something css related, I'll take a look.

@yoannmoinet
Copy link
Owner

It's probably the offset of the area to which the joystick is attached too.
If the area is top left, you won't have an offset I guess.

@yoannmoinet
Copy link
Owner

@emepetres I have a fix, which also fixes other things I believe.
Do you mind if I commit in your branch?

@yoannmoinet
Copy link
Owner

yoannmoinet commented Feb 24, 2021

I went ahead and fixed it.
Thank you very much for this addition.
It will please and fix #13 😉

@yoannmoinet yoannmoinet changed the title Add option to follow thumbstick when it reaches the border feat(follow): Add option to follow thumbstick Feb 24, 2021
@yoannmoinet yoannmoinet merged commit 5c4c002 into yoannmoinet:master Feb 24, 2021
@matthewrobb
Copy link

Thank you both!

@emepetres
Copy link
Contributor Author

sure thanks @yoannmoinet! I couldn't find time today to fix it, glad you did :)

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.

None yet

3 participants