diff --git a/components/Slider/src/MDCSlider.m b/components/Slider/src/MDCSlider.m index f7f8cb96f84..af2d698d042 100644 --- a/components/Slider/src/MDCSlider.m +++ b/components/Slider/src/MDCSlider.m @@ -74,7 +74,6 @@ - (void)commonMDCSliderInit { _thumbTrack.thumbRadius = kSliderDefaultThumbRadius; _thumbTrack.thumbIsSmallerWhenDisabled = YES; _thumbTrack.thumbIsHollowAtStart = YES; - _thumbTrack.thumbGrowsWhenDragging = YES; _thumbTrack.shouldDisplayInk = NO; _thumbTrack.shouldDisplayRipple = YES; _thumbTrack.discreteDotVisibility = MDCThumbDiscreteDotVisibilityWhenDragging; diff --git a/components/private/ThumbTrack/src/MDCThumbTrack.h b/components/private/ThumbTrack/src/MDCThumbTrack.h index 8f370e9e90a..0897118613e 100644 --- a/components/private/ThumbTrack/src/MDCThumbTrack.h +++ b/components/private/ThumbTrack/src/MDCThumbTrack.h @@ -176,9 +176,6 @@ typedef NS_ENUM(NSUInteger, MDCThumbDiscreteDotVisibility) { */ @property(nonatomic, assign) BOOL thumbIsHollowAtStart; -/** Whether or not the thumb should grow when the user is dragging it. Default is NO. */ -@property(nonatomic, assign) BOOL thumbGrowsWhenDragging; - /** The max radius of the ripple when the user touches the thumb. */ @property(nonatomic, assign) CGFloat thumbRippleMaximumRadius; diff --git a/components/private/ThumbTrack/src/MDCThumbTrack.m b/components/private/ThumbTrack/src/MDCThumbTrack.m index cf577106c41..d08e970a715 100644 --- a/components/private/ThumbTrack/src/MDCThumbTrack.m +++ b/components/private/ThumbTrack/src/MDCThumbTrack.m @@ -916,15 +916,7 @@ - (void)updateViewsForThumbAfterMoveIsAnimated:(BOOL)animated _thumbView.borderColor = _trackOffColor; } - CGFloat radius; - if (_isDraggingThumb && !_shouldDisplayThumbWithDiscreteValueLabel && _discrete && - _shouldDisplayDiscreteValueLabel && _numDiscreteValues > 1) { - radius = 0; - } else { - radius = _thumbRadius; - } - - if (radius == _thumbView.cornerRadius || !_thumbGrowsWhenDragging) { + if (_thumbRadius == _thumbView.cornerRadius) { // No need to change anything return; } @@ -934,13 +926,13 @@ - (void)updateViewsForThumbAfterMoveIsAnimated:(BOOL)animated anim.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; anim.fromValue = [NSNumber numberWithDouble:_thumbView.cornerRadius]; - anim.toValue = [NSNumber numberWithDouble:radius]; + anim.toValue = [NSNumber numberWithDouble:_thumbRadius]; anim.duration = duration; anim.delegate = self; anim.removedOnCompletion = NO; // We'll remove it ourselves as the delegate [_thumbView.layer addAnimation:anim forKey:anim.keyPath]; } - [self setDisplayThumbRadius:radius]; // Updates frame and corner radius + [self setDisplayThumbRadius:_thumbRadius]; // Updates frame and corner radius [self updateTrackMask]; }