Change default to 0

This commit is contained in:
Daniel Imms
2022-07-27 05:45:56 -07:00
parent fb4cb0f140
commit 4b8e7a5768
5 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -198,10 +198,10 @@ export class Viewport extends Disposable implements IViewport {
}
private _smoothScrollPercent(): number {
if (!this._optionsService.rawOptions.smoothScrollingDuration || !this._smoothScrollState.startTime) {
if (!this._optionsService.rawOptions.smoothScrollDuration || !this._smoothScrollState.startTime) {
return 1;
}
return Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollingDuration, 1), 0);
return Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollDuration, 1), 0);
}
private _clearSmoothScrollState(): void {
@@ -238,7 +238,7 @@ export class Viewport extends Disposable implements IViewport {
if (amount === 0) {
return false;
}
if (!this._optionsService.rawOptions.smoothScrollingDuration) {
if (!this._optionsService.rawOptions.smoothScrollDuration) {
this._viewportElement.scrollTop += amount;
} else {
this._smoothScrollState.startTime = Date.now();