MCPcopy Index your code
hub / github.com/REditorSupport/vscode-R / focusPlot

Method focusPlot

src/plotViewer/index.ts:412–420  ·  view source on GitHub ↗
(id?: HttpgdPlotId)

Source from the content-addressed store, hash-verified

410
411 // focus a specific plot id
412 public async focusPlot(id?: HttpgdPlotId): Promise<void> {
413 this.activePlot = id || this.activePlot;
414 const plt = this.plots[this.activeIndex];
415 if (plt.height !== this.viewHeight || plt.width !== this.viewHeight || plt.zoom !== this.zoom) {
416 await this.refreshPlots(this.api.getPlots());
417 } else {
418 this._focusPlot();
419 }
420 }
421 protected _focusPlot(plotId?: HttpgdPlotId): void {
422 plotId ??= this.activePlot;
423 if(!plotId){

Callers 4

nextPlotMethod · 0.95
prevPlotMethod · 0.95
addPlotMethod · 0.95
handleCommandMethod · 0.80

Calls 2

refreshPlotsMethod · 0.95
_focusPlotMethod · 0.95

Tested by

no test coverage detected