Skip to content

Commit

Permalink
renamed workerOne to worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Razvan1928 committed Mar 21, 2024
1 parent bac2166 commit c59a1ce
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions packages/nimble-components/src/wafer-map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class WaferMap extends FoundationElement {
/**
* @internal
*/
public workerOne!: Remote<MatrixRenderer>;
public worker!: Remote<MatrixRenderer>;

/**
* @internal
Expand Down Expand Up @@ -207,10 +207,10 @@ export class WaferMap extends FoundationElement {
this.experimentalHoverHandler.connect();
this.zoomHandler.connect();
const { matrixRenderer } = await createMatrixRenderer();
this.workerOne = matrixRenderer;
this.worker = matrixRenderer;

const offscreenOne = this.canvasOne.transferControlToOffscreen();
await this.workerOne.setCanvas(
await this.worker.setCanvas(
transfer(offscreenOne, [offscreenOne as unknown as Transferable])
);

Expand Down Expand Up @@ -288,32 +288,32 @@ export class WaferMap extends FoundationElement {
?.toArray() as number[],
values: this.diesTable.getChild('value')?.toArray() as number[]
} as WaferMapMatrix;
await this.workerOne.updateMatrix(waferMapMatrix);
await this.worker.updateMatrix(waferMapMatrix);
await this.setupWorker();
await this.workerOne.drawWafer();
await this.worker.drawWafer();
}

private async setupWorker(): Promise<void> {
await this.workerOne.setDiesDimensions(this.dataManager.dieDimensions);
await this.worker.setDiesDimensions(this.dataManager.dieDimensions);

const scaleX = this.dataManager.horizontalScale(1)!
- this.dataManager.horizontalScale(0)!;
const scaleY = this.dataManager.verticalScale(1)!
- this.dataManager.verticalScale(0)!;
await this.workerOne.setScaling(scaleX, scaleY);
await this.worker.setScaling(scaleX, scaleY);

await this.workerOne.setBases(
await this.worker.setBases(
this.dataManager.horizontalScale(0)!,
this.dataManager.verticalScale(0)!
);
await this.workerOne.setMargin(this.dataManager.margin);
await this.worker.setMargin(this.dataManager.margin);

const topLeftCanvasCorner = this.transform.invert([0, 0]);
const bottomRightCanvasCorner = this.transform.invert([
this.canvas.width,
this.canvas.height
]);
await this.workerOne.setCanvasCorners(
await this.worker.setCanvasCorners(
{
x: topLeftCanvasCorner[0],
y: topLeftCanvasCorner[1]
Expand Down Expand Up @@ -343,7 +343,7 @@ export class WaferMap extends FoundationElement {
this.canvas.height = height;
this.canvasWidth = width;
this.canvasHeight = height;
this.workerOne.setCanvasDimensions({ width, height }).then(
this.worker.setCanvasDimensions({ width, height }).then(
() => {},
() => {}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export class WorkerRenderer {
}

public async drawWafer(): Promise<void> {
await this.wafermap.workerOne.setTransform(this.wafermap.transform);
await this.wafermap.workerOne.drawWafer();
await this.wafermap.worker.setTransform(this.wafermap.transform);
await this.wafermap.worker.drawWafer();
this.renderHover();
}

Expand Down

0 comments on commit c59a1ce

Please sign in to comment.