From 0e25e4acf608d239a029acde52bda79ea297954b Mon Sep 17 00:00:00 2001 From: Razvan Nazare Date: Thu, 21 Mar 2024 16:31:11 +0200 Subject: [PATCH] renamed canvasOne to workerCanvas, moved drawWafer inside a better if --- packages/nimble-components/src/wafer-map/index.ts | 6 +++--- packages/nimble-components/src/wafer-map/template.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nimble-components/src/wafer-map/index.ts b/packages/nimble-components/src/wafer-map/index.ts index 9abd88ffd8..4e5498d418 100644 --- a/packages/nimble-components/src/wafer-map/index.ts +++ b/packages/nimble-components/src/wafer-map/index.ts @@ -91,7 +91,7 @@ export class WaferMap extends FoundationElement { /** * @internal */ - public readonly canvasOne!: HTMLCanvasElement; + public readonly workerCanvas!: HTMLCanvasElement; /** * @internal @@ -209,7 +209,7 @@ export class WaferMap extends FoundationElement { const { matrixRenderer } = await createMatrixRenderer(); this.worker = matrixRenderer; - const offscreenOne = this.canvasOne.transferControlToOffscreen(); + const offscreenOne = this.workerCanvas.transferControlToOffscreen(); await this.worker.setCanvas( transfer(offscreenOne, [offscreenOne as unknown as Transferable]) ); @@ -252,6 +252,7 @@ export class WaferMap extends FoundationElement { if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) { this.dataManager.updateContainerDimensions(); this.renderer.updateSortedDiesAndDrawWafer(); + await this.drawWafer(); } else if (this.waferMapUpdateTracker.requiresScalesUpdate) { this.dataManager.updateScales(); this.renderer.updateSortedDiesAndDrawWafer(); @@ -268,7 +269,6 @@ export class WaferMap extends FoundationElement { } else if (this.waferMapUpdateTracker.requiresDrawnWaferUpdate) { await this.renderer.drawWafer(); } - await this.drawWafer(); this.zoomHandler.connect(); } else if (this.waferMapUpdateTracker.requiresRenderHoverUpdate) { this.renderer.renderHover(); diff --git a/packages/nimble-components/src/wafer-map/template.ts b/packages/nimble-components/src/wafer-map/template.ts index 6ecab08bed..6924ac6065 100644 --- a/packages/nimble-components/src/wafer-map/template.ts +++ b/packages/nimble-components/src/wafer-map/template.ts @@ -22,7 +22,7 @@ export const template = html` - +