* Adds classes to the menu panel based on its position. Can be used by * consumers to add specific styling based on the position. * @param posX Position of the menu along the x axis. * @param posY Position of the menu along the y axis. * @docs-private
(posX: MenuPositionX = this.xPosition, posY: MenuPositionY = this.yPosition)
| 440 | * @docs-private |
| 441 | */ |
| 442 | setPositionClasses(posX: MenuPositionX = this.xPosition, posY: MenuPositionY = this.yPosition) { |
| 443 | this._classList = { |
| 444 | ...this._classList, |
| 445 | ['mat-menu-before']: posX === 'before', |
| 446 | ['mat-menu-after']: posX === 'after', |
| 447 | ['mat-menu-above']: posY === 'above', |
| 448 | ['mat-menu-below']: posY === 'below', |
| 449 | }; |
| 450 | |
| 451 | this._changeDetectorRef.markForCheck(); |
| 452 | } |
| 453 | |
| 454 | /** Callback that is invoked when the panel animation completes. */ |
| 455 | protected _onAnimationDone(state: string) { |
no test coverage detected