()
| 860 | this._onRequestScrollLines.fire({ amount: t3, suppressScrollEvent: true }); |
| 861 | } |
| 862 | _smoothScroll() { |
| 863 | if (this._isDisposed || -1 === this._smoothScrollState.origin || -1 === this._smoothScrollState.target) return; |
| 864 | const e3 = this._smoothScrollPercent(); |
| 865 | this._viewportElement.scrollTop = this._smoothScrollState.origin + Math.round(e3 * (this._smoothScrollState.target - this._smoothScrollState.origin)), e3 < 1 ? this._coreBrowserService.window.requestAnimationFrame((() => this._smoothScroll())) : this._clearSmoothScrollState(); |
| 866 | } |
| 867 | _smoothScrollPercent() { |
| 868 | return this._optionsService.rawOptions.smoothScrollDuration && this._smoothScrollState.startTime ? Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollDuration, 1), 0) : 1; |
| 869 | } |
no test coverage detected