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

Method _smoothScrollPercent

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

Source from the content-addressed store, hash-verified

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 }
870 _clearSmoothScrollState() {
871 this._smoothScrollState.startTime = 0, this._smoothScrollState.origin = -1, this._smoothScrollState.target = -1;
872 }

Callers 3

_smoothScrollMethod · 0.80
handleWheelMethod · 0.80
scrollLinesMethod · 0.80

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected