Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Razvan1928 committed Mar 25, 2024
1 parent f414944 commit 2842191
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/nimble-components/src/utilities/tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function importAll(r: __WebpackModuleApi.RequireContext): void {
require('./setup-configuration.js');

// all browser test scripts
importAll(require.context('../../', true, /\.spec\.js$/));
importAll(require.context('../../wafer-map', true, /\.spec\.js$/));
importAll(
require.context(
'../../../../build/generate-workers/dist/esm',
Expand Down
5 changes: 5 additions & 0 deletions packages/nimble-components/src/wafer-map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ export class WaferMap<
*/
public readonly canvas!: HTMLCanvasElement;

/**
* @internal
*/
public readonly canvasWorker!: HTMLCanvasElement;

/**
* @internal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@ import { HoverDieOpacity } from '../../types';
* Responsible for drawing the dies inside the wafer map, adding dieText and scaling the canvas
*/
export class WorkerRenderer {
public constructor(private readonly wafermap: WaferMap) {}
public constructor(private readonly wafermap: WaferMap) { }

public updateSortedDiesAndDrawWafer(): void {
// redundant function for backwards compatibility
void this.drawWafer();
}

public async drawWafer(): Promise<void> {
await this.wafermap.worker.setTransform(this.wafermap.transform);
await this.wafermap.worker.drawWafer();
this.renderHover();
try {
await this.wafermap.worker.setTransform(this.wafermap.transform);
await this.wafermap.worker.drawWafer();
this.renderHover();
} catch (error) {
// eslint-disable-next-line no-console
console.error('hello');
// eslint-disable-next-line no-console
console.error(this.wafermap.worker);
}
}

public renderHover(): void {
Expand Down

0 comments on commit 2842191

Please sign in to comment.