Skip to content

Enabled usage of height and width props from Touch Dimensions on Mark… #191

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

Conversation

thiagofsr97
Copy link
Contributor

Don't know why this wasn't enabled before, but would be really nice if it were. The sliders markers sometimes are hard to hit and drag depending on the device, requiring the increase of width and height on the touchable area.

Enabled usage of height and width props from Touch Dimensions on Markers.
@ptomasroos
Copy link
Owner

Thanks!
Looks good.

Why do we need to remove

alignSelf: 'stretch',?

@thiagofsr97
Copy link
Contributor Author

Thanks!
Looks good.

Why do we need to remove

alignSelf: 'stretch',?

I'll try to explain with the help of some screenshots, but in sum, the problem is related to the centering of the marker when setting values to Width and Height:
In the following images the blue semi-transparent background refers to the View holding the Pan Handlers (Touchable Area), whereas the red one refers to the parent view (marker container).

image

  • The above image is when no changes are done to the Touchable Area's height and width and also keeping the stretch.

image
image

  • Here was set height and width of 90 (the values is irrelevant, only needs to be set). The alignSelf: 'stretch' was kept.

image
image

  • This is the final result after removing the alignSelf property or changing it to center, it made no difference keeping it.

Also: the final result is the same even when there's no values set to width and height, so alignSelf: 'stretch' has proven to be not necessary at all.

@ptomasroos
Copy link
Owner

Thanks.

Perfect! Thanks for helping out!

@ptomasroos ptomasroos merged commit c10612d into ptomasroos:master May 15, 2020
itenl pushed a commit to itenl/react-native-multi-slider that referenced this pull request Aug 27, 2021
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.

2 participants