Sets the positions of the datepicker in dropdown mode based on the current configuration.
(strategy: FlexibleConnectedPositionStrategy)
| 823 | |
| 824 | /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */ |
| 825 | private _setConnectedPositions(strategy: FlexibleConnectedPositionStrategy) { |
| 826 | const primaryX = this.xPosition === 'end' ? 'end' : 'start'; |
| 827 | const secondaryX = primaryX === 'start' ? 'end' : 'start'; |
| 828 | const primaryY = this.yPosition === 'above' ? 'bottom' : 'top'; |
| 829 | const secondaryY = primaryY === 'top' ? 'bottom' : 'top'; |
| 830 | |
| 831 | return strategy.withPositions([ |
| 832 | { |
| 833 | originX: primaryX, |
| 834 | originY: secondaryY, |
| 835 | overlayX: primaryX, |
| 836 | overlayY: primaryY, |
| 837 | }, |
| 838 | { |
| 839 | originX: primaryX, |
| 840 | originY: primaryY, |
| 841 | overlayX: primaryX, |
| 842 | overlayY: secondaryY, |
| 843 | }, |
| 844 | { |
| 845 | originX: secondaryX, |
| 846 | originY: secondaryY, |
| 847 | overlayX: secondaryX, |
| 848 | overlayY: primaryY, |
| 849 | }, |
| 850 | { |
| 851 | originX: secondaryX, |
| 852 | originY: primaryY, |
| 853 | overlayX: secondaryX, |
| 854 | overlayY: secondaryY, |
| 855 | }, |
| 856 | ]); |
| 857 | } |
| 858 | |
| 859 | /** Gets an observable that will emit when the overlay is supposed to be closed. */ |
| 860 | private _getCloseStream(overlayRef: OverlayRef) { |
nothing calls this directly
no test coverage detected