Skip to content

Commit

Permalink
[Buttons] Fix FAB icon scale collapse timing (#1794)
Browse files Browse the repository at this point in the history
The Floating Action Button's collapse animation timing function should
start at 40% and end at 100% (time), rather than starting at 0% and
ending at 20% (time).

Closes #1793
  • Loading branch information
Robert Moore committed Aug 14, 2017
1 parent ba51ddd commit 18c8a88
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/Buttons/src/MDCFloatingButton+Animation.m
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ - (void)collapse:(BOOL)animated completion:(void (^_Nullable)(void))completion {
[MDCFloatingButton collapseTransform])]
fromValue:nil
timingFunction:[[CAMediaTimingFunction alloc]
initWithControlPoints:0.0f:0.0f:0.2f:1.0f]
fillMode:kCAFillModeForwards
duration:kMDCFloatingButtonExitIconDuration
initWithControlPoints:0.4f:0.0f:1.0f:1.0f]
fillMode:kCAFillModeForwards duration:kMDCFloatingButtonExitIconDuration
beginOffset:kMDCFloatingButtonExitIconOffset];
[self.imageView.layer addAnimation:iconScaleAnimation forKey:kMDCFloatingButtonTransformKey];

Expand Down

0 comments on commit 18c8a88

Please sign in to comment.