MultiSlider icon indicating copy to clipboard operation
MultiSlider copied to clipboard

centerThumbOnTrackEnd(true) makes thumbTouchExpansionRadius unreliable

Open JoseDelPino opened this issue 1 year ago • 3 comments

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)

JoseDelPino avatar Sep 14 '24 14:09 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(true) .showsThumbImageShadow(true) .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 == true ? 0.4 : 1)

kgarcia181 avatar Jun 26 '25 18:06 kgarcia181

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)

kgarcia181 avatar Jun 28 '25 14:06 kgarcia181

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)

kgarcia181 avatar Jul 07 '25 11:07 kgarcia181