MCPcopy Create free account
hub / github.com/angular/components / _getAnimationDirection

Method _getAnimationDirection

src/cdk/stepper/stepper.ts:534–542  ·  view source on GitHub ↗

Returns position state of the step with the given index.

(index: number)

Source from the content-addressed store, hash-verified

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

Callers 1

stepper.spec.tsFile · 0.80

Calls 1

_layoutDirectionMethod · 0.95

Tested by

no test coverage detected