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

Fix issue - Draggable thumb goes off the view #41

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

Conversation

rimzici
Copy link

@rimzici rimzici commented Jun 12, 2019

Addressing the issue mentioned here.

  • Setting the pan handlers on the Image instead of the outer View.

  • Also setting border radius on the Image.

  • Some tweaks inside pan handler functions.

rimzici added 8 commits June 12, 2019 16:04
Idea is to make sure the touchable are is as close
as the actual circular part of the image. So that pageX
and pageY values are as expected.
This will make sure touch works, on pressing right on top
of the draggable thumb.
This commit updates the thumb color and position during
onPanResponderGrant and onPanResponderMove if they are
inside bounds. This will make sure on pressing anywhere on the
circular slide and on dragging finger from outside, the slider
works properly.
Hence the image is the pan responder and not the outer View
it is important to keep some(atleast half) of the draggable thumb
inside the circular Image, for drag to be possible if user press
right on the thumb.
Changing the value of 'toggleMeToforceUpdateInitialColor'
will update the currentColor, with what ever value is passed
as initialColor.
Also expose new method onGrant
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