-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(select): fix panel close animation #1696
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of nits.
@@ -58,10 +58,10 @@ export const transformPanel: AnimationEntryMetadata = trigger('transformPanel', | |||
width: '100%', | |||
transform: `translate3d(0, 0, 0) scaleY(0)` | |||
}), | |||
animate(`150ms cubic-bezier(0.55, 0, 0.55, 0.2)`) | |||
animate(`150ms cubic-bezier(0.25, 0.8, 0.25, 1)`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where did you get those values? Seems like a more aggressive ease-out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the Material 1 values for the ease out animation. I accidentally used the Material 1 values for the ease in animation here (copy-paste error).
@@ -158,7 +159,6 @@ export class MdSelect implements AfterContentInit, OnDestroy { | |||
this._focusCorrectOption(); | |||
this.onOpen.emit(); | |||
} else { | |||
this._focusHost(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the comment above to reflect the code.
@@ -108,6 +108,7 @@ export class MdSelect implements AfterContentInit, OnDestroy { | |||
/** Closes the overlay panel. */ | |||
close(): void { | |||
this._panelOpen = false; | |||
this._focusHost(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the comment above to reflect the code.
@@ -16,6 +16,7 @@ md-select { | |||
height: $md-select-trigger-height; | |||
min-width: $md-select-trigger-min-width; | |||
cursor: pointer; | |||
user-select: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
1b7ab1e
to
65f0c58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Tweaks to make the menu close animation smoother.
r: @hansl