mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Fix lint error due to private variable
This commit is contained in:
@@ -24,7 +24,7 @@ export class TimeBasedDebouncer implements IRenderDebouncer {
|
||||
|
||||
constructor(
|
||||
private _renderCallback: (start: number, end: number) => void,
|
||||
private readonly debounceThresholdMS = RENDER_DEBOUNCE_THRESHOLD_MS
|
||||
private readonly _debounceThresholdMS = RENDER_DEBOUNCE_THRESHOLD_MS
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -46,14 +46,14 @@ export class TimeBasedDebouncer implements IRenderDebouncer {
|
||||
// Only refresh if the time since last refresh is above a threshold, otherwise wait for
|
||||
// enough time to pass before refreshing again.
|
||||
const refreshRequestTime: number = Date.now();
|
||||
if (refreshRequestTime - this._lastRefreshMs >= this.debounceThresholdMS) {
|
||||
if (refreshRequestTime - this._lastRefreshMs >= this._debounceThresholdMS) {
|
||||
// Enough time has lapsed since the last refresh; refresh immediately
|
||||
this._lastRefreshMs = refreshRequestTime;
|
||||
this._innerRefresh();
|
||||
} else if (!this._additionalRefreshRequested) {
|
||||
// This is the first additional request throttled; set up trailing refresh
|
||||
const elapsed = refreshRequestTime - this._lastRefreshMs;
|
||||
const waitPeriodBeforeTrailingRefresh = this.debounceThresholdMS - elapsed;
|
||||
const waitPeriodBeforeTrailingRefresh = this._debounceThresholdMS - elapsed;
|
||||
this._additionalRefreshRequested = true;
|
||||
|
||||
this._refreshTimeoutID = window.setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user