(height: number, width: number, userTriggered: boolean = false)
| 550 | } |
| 551 | |
| 552 | protected handleResize(height: number, width: number, userTriggered: boolean = false): void { |
| 553 | this.viewHeight = height; |
| 554 | this.viewWidth = width; |
| 555 | if (userTriggered || this.resizeTimeoutLength === 0) { |
| 556 | if(this.resizeTimeout){ |
| 557 | clearTimeout(this.resizeTimeout); |
| 558 | } |
| 559 | this.resizeTimeout = undefined; |
| 560 | void this.resizePlot(); |
| 561 | } else if (!this.resizeTimeout) { |
| 562 | this.resizeTimeout = setTimeout(() => { |
| 563 | void this.resizePlot().then(() => |
| 564 | this.resizeTimeout = undefined |
| 565 | ); |
| 566 | }, this.resizeTimeoutLength); |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | protected async resizePlot(id?: HttpgdPlotId): Promise<void> { |
| 571 | id ??= this.activePlot; |
no test coverage detected