MCPcopy
hub / github.com/codeaashu/claude-code / _smoothScroll

Method _smoothScroll

src/server/web/public/terminal.js:862–866  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 }

Callers 2

handleWheelMethod · 0.80
scrollLinesMethod · 0.80

Calls 2

_smoothScrollPercentMethod · 0.80

Tested by

no test coverage detected