MCPcopy
hub / github.com/angular/components / _getAnimationDirection

Method _getAnimationDirection

src/cdk/stepper/stepper.ts:530–538  ·  view source on GitHub ↗

Returns position state of the step with the given index.

(index: number)

Source from the content-addressed store, hash-verified

528
529 /** Returns position state of the step with the given index. */
530 _getAnimationDirection(index: number): StepContentPositionState {
531 const position = index - this._selectedIndex();
532 if (position < 0) {
533 return this._layoutDirection() === 'rtl' ? 'next' : 'previous';
534 } else if (position > 0) {
535 return this._layoutDirection() === 'rtl' ? 'previous' : 'next';
536 }
537 return 'current';
538 }
539
540 /** Returns the index of the currently-focused step header. */
541 _getFocusIndex(): number | null {

Callers 1

stepper.spec.tsFile · 0.80

Calls 1

_layoutDirectionMethod · 0.95

Tested by

no test coverage detected