Build the position strategy for the overlay which specifies where to place the menu.
()
| 282 | |
| 283 | /** Build the position strategy for the overlay which specifies where to place the menu. */ |
| 284 | private _getOverlayPositionStrategy(): FlexibleConnectedPositionStrategy { |
| 285 | const strategy = createFlexibleConnectedPositionStrategy(this._injector, this._elementRef) |
| 286 | .withLockedPosition() |
| 287 | .withFlexibleDimensions(false) |
| 288 | .withPositions(this._getOverlayPositions()); |
| 289 | |
| 290 | if (this.transformOriginSelector) { |
| 291 | strategy.withTransformOriginOn(this.transformOriginSelector); |
| 292 | } |
| 293 | |
| 294 | return strategy; |
| 295 | } |
| 296 | |
| 297 | /** Get the preferred positions for the opened menu relative to the menu item. */ |
| 298 | private _getOverlayPositions(): ConnectedPosition[] { |
no test coverage detected