* Sets the orientation of the container. * @param orientation New orientation for the container.
(orientation: DropListOrientation)
| 374 | * @param orientation New orientation for the container. |
| 375 | */ |
| 376 | withOrientation(orientation: DropListOrientation): this { |
| 377 | if (orientation === 'mixed') { |
| 378 | this._sortStrategy = new MixedSortStrategy(this._document, this._dragDropRegistry); |
| 379 | } else { |
| 380 | const strategy = new SingleAxisSortStrategy(this._dragDropRegistry); |
| 381 | strategy.direction = this._direction; |
| 382 | strategy.orientation = orientation; |
| 383 | this._sortStrategy = strategy; |
| 384 | } |
| 385 | this._sortStrategy.withElementContainer(this._container); |
| 386 | this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this)); |
| 387 | return this; |
| 388 | } |
| 389 | |
| 390 | /** |
| 391 | * Sets which parent elements are can be scrolled while the user is dragging. |
no test coverage detected