Skip to content

centerThumbOnTrackEnd(true) makes thumbTouchExpansionRadius unreliable #109

@JoseDelPino

Description

@JoseDelPino

If centerThumbOnTrackEnd is set to true and thumbImage is set, the thumb is not fully clickable. The outer most parts of the thumb (left side on the left thumb and right side on the right thumb) cannot be dragged.

MultiValueSlider(value: ratingProxy, minimumValue: 0, maximumValue: 4 )
.orientation(.horizontal)
.outerTrackColor(.lightGray)
.trackWidth(5)
.snapValues([0,1,2,3,4])
.centerThumbOnTrackEnd(false)
.showsThumbImageShadow(false)
.thumbImage(UIImage(systemName: "circle.fill")?.resized(to: CGSize(width: 40, height: 40)).withTintColor(.ranking))
.thumbTouchExpansionRadius(100)
.tint(Color(.ranking))
.frame(height: 50)
.padding(.horizontal, 40)
.opacity(filters.visited == false ? 0.4 : 1)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions