Fix issue - Draggable thumb goes off the view#41
Open
rimzici wants to merge 8 commits intonetbeast:masterfrom
Open
Fix issue - Draggable thumb goes off the view#41rimzici wants to merge 8 commits intonetbeast:masterfrom
rimzici wants to merge 8 commits intonetbeast:masterfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.