MCPcopy Create free account
hub / github.com/REditorSupport/vscode-R / refreshPlotsDelayed

Method refreshPlotsDelayed

src/plotViewer/index.ts:579–590  ·  view source on GitHub ↗
(plotsIdResponse: HttpgdIdResponse[], redraw: boolean = false, force: boolean = false)

Source from the content-addressed store, hash-verified

577 }
578
579 protected async refreshPlotsDelayed(plotsIdResponse: HttpgdIdResponse[], redraw: boolean = false, force: boolean = false): Promise<void> {
580 if(this.refreshTimeoutLength === 0){
581 await this.refreshPlots(plotsIdResponse, redraw, force);
582 } else{
583 clearTimeout(this.refreshTimeout);
584 this.refreshTimeout = setTimeout(() => {
585 void this.refreshPlots(plotsIdResponse, redraw, force).then(() =>
586 this.refreshTimeout = undefined
587 );
588 }, this.refreshTimeoutLength);
589 }
590 }
591
592 protected async refreshPlots(plotsIdResponse: HttpgdIdResponse[], redraw: boolean = false, force: boolean = false): Promise<void> {
593 const nPlots = this.plots.length;

Callers 1

constructorMethod · 0.95

Calls 1

refreshPlotsMethod · 0.95

Tested by

no test coverage detected