(id: HttpgdPlotId, width: number, height: number, zoom: number)
| 645 | |
| 646 | // get content of a single plot |
| 647 | protected async getPlotContent(id: HttpgdPlotId, width: number, height: number, zoom: number): Promise<HttpgdPlot<string>> { |
| 648 | |
| 649 | const args = { |
| 650 | id: id, |
| 651 | height: height, |
| 652 | width: width, |
| 653 | zoom: zoom, |
| 654 | renderer: 'svgp' |
| 655 | }; |
| 656 | |
| 657 | const plotContent = await this.api.getPlot(args); |
| 658 | const svg = await plotContent?.text() || ''; |
| 659 | |
| 660 | const plt: HttpgdPlot<string> = { |
| 661 | id: id, |
| 662 | data: svg, |
| 663 | height: height, |
| 664 | width: width, |
| 665 | zoom: zoom, |
| 666 | }; |
| 667 | |
| 668 | this.viewHeight ??= plt.height; |
| 669 | this.viewWidth ??= plt.width; |
| 670 | return plt; |
| 671 | } |
| 672 | |
| 673 | |
| 674 | // functions for initial or re-drawing of html: |
no outgoing calls
no test coverage detected