Fixed on click scroll when selected text size and general text size are different #192
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.
Hi,
Thanks for this library. It has been a great help. I have however had 1 small problem when using the following settings:
np_selectedTextSize = 70sp
np_textSize = 30sp
np_wheelItemCount = 7
np_orientation = horizontal
Tapping the selected number causes the picker to decrement and tapping the first number to the right of the selected number causes no scroll.
I believe the cause is the line
int selectorIndexOffset = (eventX / mSelectorElementSize) - mWheelMiddleItemIndex;
If I understand the code correctly, it is assuming all elements are a similar size as it is using the size of the selector to determine which index has been tapped. If the selector element is bigger due to the the selector text size being bigger, the result of this will not be accurate.