* If a custom scrollToHandler is defined, call that, otherwise do the generic * scrollIntoView call. * * @param {boolean | ScrollIntoViewOptions} scrollToOptions - If true, uses the default `scrollIntoView`, * if an object, passes that object as the params to `scrollIntoView` i.e. `{ beh
(scrollToOptions: boolean | ScrollIntoViewOptions)
| 626 | * @private |
| 627 | */ |
| 628 | _scrollTo(scrollToOptions: boolean | ScrollIntoViewOptions) { |
| 629 | const { element } = this._getResolvedAttachToOptions(); |
| 630 | |
| 631 | if (isFunction(this.options.scrollToHandler)) { |
| 632 | this.options.scrollToHandler(element as HTMLElement); |
| 633 | } else if ( |
| 634 | isElement(element) && |
| 635 | typeof element.scrollIntoView === 'function' |
| 636 | ) { |
| 637 | element.scrollIntoView(scrollToOptions); |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | /** |
| 642 | * _getClassOptions gets all possible classes for the step |
no test coverage detected