-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(menu): reposition menu if it would open off screen #1761
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
b93d246 to
d9b5bd5
Compare
src/lib/menu/menu-trigger.ts
Outdated
| /** Converts the designated point into an OriginConnectionPosition. */ | ||
| private _originPos(x: HorizontalConnectionPos, | ||
| y: VerticalConnectionPos): OriginConnectionPosition { | ||
| return {originX: x, originY: y} as OriginConnectionPosition; |
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.
Is the as OriginConnectionPosition necessary? The types should be structurally identical.
|
Realized I need to change the animation origin point if a fallback is used, so this will need some more work. |
7d72eba to
8f9dfa6
Compare
jelbourn
left a comment
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
src/lib/menu/menu-trigger.ts
Outdated
| * correct, even if a fallback position is used for the overlay. | ||
| */ | ||
| private _subscribeToPositions(position: ConnectedPositionStrategy): void { | ||
| this._positionSubscription = position.onPositionChange.subscribe( |
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.
Shouldn't need the type here
|
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. |
Closes #1540.