@ni/nimble-components 23.0.0 → 23.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/all-components-bundle.js +248 -192
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +135 -131
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/wafer-map/index.d.ts +13 -6
  6. package/dist/esm/wafer-map/index.js +33 -16
  7. package/dist/esm/wafer-map/index.js.map +1 -1
  8. package/dist/esm/wafer-map/modules/data-manager.js +1 -1
  9. package/dist/esm/wafer-map/modules/data-manager.js.map +1 -1
  10. package/dist/esm/wafer-map/modules/experimental/hover-handler.d.ts +23 -0
  11. package/dist/esm/wafer-map/modules/experimental/hover-handler.js +80 -0
  12. package/dist/esm/wafer-map/modules/experimental/hover-handler.js.map +1 -0
  13. package/dist/esm/wafer-map/modules/{worker-renderer.d.ts → experimental/worker-renderer.d.ts} +1 -1
  14. package/dist/esm/wafer-map/modules/{worker-renderer.js → experimental/worker-renderer.js} +1 -1
  15. package/dist/esm/wafer-map/modules/experimental/worker-renderer.js.map +1 -0
  16. package/dist/esm/wafer-map/modules/hover-handler.d.ts +10 -2
  17. package/dist/esm/wafer-map/modules/hover-handler.js +43 -26
  18. package/dist/esm/wafer-map/modules/hover-handler.js.map +1 -1
  19. package/dist/esm/wafer-map/modules/prerendering.d.ts +1 -3
  20. package/dist/esm/wafer-map/modules/prerendering.js +5 -6
  21. package/dist/esm/wafer-map/modules/prerendering.js.map +1 -1
  22. package/dist/esm/wafer-map/modules/wafer-map-validator.js +17 -23
  23. package/dist/esm/wafer-map/modules/wafer-map-validator.js.map +1 -1
  24. package/dist/esm/wafer-map/modules/zoom-handler.d.ts +11 -7
  25. package/dist/esm/wafer-map/modules/zoom-handler.js +27 -37
  26. package/dist/esm/wafer-map/modules/zoom-handler.js.map +1 -1
  27. package/dist/esm/wafer-map/template.d.ts +1 -1
  28. package/dist/esm/wafer-map/types.d.ts +11 -0
  29. package/dist/esm/wafer-map/types.js.map +1 -1
  30. package/package.json +2 -2
  31. package/dist/esm/wafer-map/modules/event-coordinator.d.ts +0 -19
  32. package/dist/esm/wafer-map/modules/event-coordinator.js +0 -35
  33. package/dist/esm/wafer-map/modules/event-coordinator.js.map +0 -1
  34. package/dist/esm/wafer-map/modules/worker-renderer.js.map +0 -1
@@ -16301,7 +16301,7 @@
16301
16301
 
16302
16302
  /**
16303
16303
  * Do not edit directly
16304
- * Generated on Thu, 21 Mar 2024 16:56:48 GMT
16304
+ * Generated on Mon, 25 Mar 2024 16:47:43 GMT
16305
16305
  */
16306
16306
 
16307
16307
  const Information100DarkUi = "#a46eff";
@@ -73588,12 +73588,7 @@ img.ProseMirror-separator {
73588
73588
 
73589
73589
  var identity$2 = new Transform(1, 0, 0);
73590
73590
 
73591
- transform.prototype = Transform.prototype;
73592
-
73593
- function transform(node) {
73594
- while (!node.__zoom) if (!(node = node.parentNode)) return identity$2;
73595
- return node.__zoom;
73596
- }
73591
+ Transform.prototype;
73597
73592
 
73598
73593
  function nopropagation(event) {
73599
73594
  event.stopImmediatePropagation();
@@ -75312,16 +75307,15 @@ img.ProseMirror-separator {
75312
75307
  get diesRenderInfo() {
75313
75308
  return this._diesRenderInfo;
75314
75309
  }
75315
- constructor(wafermap, dataManager) {
75310
+ constructor(wafermap) {
75316
75311
  this.wafermap = wafermap;
75317
- this.dataManager = dataManager;
75318
75312
  this.fontSizeFactor = 0.8;
75319
75313
  this.nonHighlightedOpacity = 0.3;
75320
75314
  this.emptyDieColor = 'rgba(218,223,236,1)';
75321
75315
  this.nanDieColor = 'rgba(122,122,122,1)';
75322
75316
  }
75323
75317
  updateLabelsFontSize() {
75324
- this._labelsFontSize = this.calculateLabelsFontSize(this.dataManager.dieDimensions, this.wafermap.maxCharacters);
75318
+ this._labelsFontSize = this.calculateLabelsFontSize(this.wafermap.dataManager.dieDimensions, this.wafermap.maxCharacters);
75325
75319
  this.updateDiesRenderInfo();
75326
75320
  }
75327
75321
  updateDiesRenderInfo() {
@@ -75332,9 +75326,9 @@ img.ProseMirror-separator {
75332
75326
  .filter(isDieRenderInfo);
75333
75327
  }
75334
75328
  computeDieRenderInfo(die) {
75335
- const margin = this.dataManager.margin;
75336
- const scaledX = this.dataManager.horizontalScale(die.x);
75337
- const scaledY = this.dataManager.verticalScale(die.y);
75329
+ const margin = this.wafermap.dataManager.margin;
75330
+ const scaledX = this.wafermap.dataManager.horizontalScale(die.x);
75331
+ const scaledY = this.wafermap.dataManager.verticalScale(die.y);
75338
75332
  if (scaledX === undefined || scaledY === undefined) {
75339
75333
  return null;
75340
75334
  }
@@ -75453,7 +75447,7 @@ img.ProseMirror-separator {
75453
75447
  constructor(wafermap) {
75454
75448
  this.wafermap = wafermap;
75455
75449
  this.computations = new Computations(wafermap);
75456
- this.prerendering = new Prerendering(wafermap, this);
75450
+ this.prerendering = new Prerendering(wafermap);
75457
75451
  }
75458
75452
  updateContainerDimensions() {
75459
75453
  this.computations.updateContainerDimensions();
@@ -75602,147 +75596,6 @@ img.ProseMirror-separator {
75602
75596
  }
75603
75597
  }
75604
75598
 
75605
- /**
75606
- * ZoomHandler deals with user interactions and events like zooming
75607
- */
75608
- class ZoomHandler {
75609
- constructor(wafermap) {
75610
- this.wafermap = wafermap;
75611
- this.zoomTransform = identity$2;
75612
- this.minScale = 1.1;
75613
- this.minExtentPoint = [-100, -100];
75614
- this.extentPadding = 100;
75615
- }
75616
- createZoomBehavior() {
75617
- this.zoomBehavior = zoom()
75618
- .scaleExtent([
75619
- 1.1,
75620
- this.getZoomMax(this.wafermap.canvasWidth * this.wafermap.canvasHeight, this.wafermap.dataManager.containerDimensions.width
75621
- * this.wafermap.dataManager.containerDimensions.height)
75622
- ])
75623
- .translateExtent([
75624
- this.minExtentPoint,
75625
- [
75626
- this.wafermap.canvasWidth + this.extentPadding,
75627
- this.wafermap.canvasHeight + this.extentPadding
75628
- ]
75629
- ])
75630
- .filter((event) => {
75631
- const transform$1 = transform(this.wafermap.canvas);
75632
- const filterEval = transform$1.k >= this.minScale || event.type === 'wheel';
75633
- return filterEval;
75634
- })
75635
- .on('zoom', (event) => {
75636
- // D3 will automatically remove existing handlers when adding new ones
75637
- // See: https://github.com/d3/d3-zoom/blob/v3.0.0/README.md#zoom_on
75638
- this.rescale(event);
75639
- });
75640
- this.zoomBehavior(select(this.wafermap.canvas));
75641
- }
75642
- rescale(event) {
75643
- const transform = event.transform;
75644
- if (transform.k === this.minScale) {
75645
- this.zoomTransform = identity$2;
75646
- this.zoomBehavior.transform(select(this.wafermap.canvas), identity$2);
75647
- }
75648
- else {
75649
- this.zoomTransform = transform;
75650
- }
75651
- this.wafermap.transform = this.zoomTransform;
75652
- }
75653
- getZoomMax(canvasArea, dataArea) {
75654
- return Math.ceil((dataArea / canvasArea) * 100);
75655
- }
75656
- }
75657
-
75658
- /**
75659
- * HoverHandler deals with user interactions and events like hovering
75660
- */
75661
- class HoverHandler {
75662
- constructor(wafermap) {
75663
- this.wafermap = wafermap;
75664
- }
75665
- mousemove(event) {
75666
- const mousePosition = {
75667
- x: event.offsetX,
75668
- y: event.offsetY
75669
- };
75670
- if (!this.hoversOverDie(this.wafermap, mousePosition)) {
75671
- this.wafermap.hoverDie = undefined;
75672
- return;
75673
- }
75674
- // get original mouse position in case we are in zoom.
75675
- const invertedPoint = this.wafermap.transform.invert([
75676
- mousePosition.x,
75677
- mousePosition.y
75678
- ]);
75679
- const dieCoordinates = this.calculateDieCoordinates(this.wafermap, {
75680
- x: invertedPoint[0],
75681
- y: invertedPoint[1]
75682
- });
75683
- this.wafermap.hoverDie = this.wafermap.dataManager.getWaferMapDie(dieCoordinates);
75684
- }
75685
- mouseout() {
75686
- this.wafermap.hoverDie = undefined;
75687
- }
75688
- calculateDieCoordinates(wafermap, mousePosition) {
75689
- const originLocation = wafermap.originLocation;
75690
- const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
75691
- || originLocation === WaferMapOriginLocation.topLeft
75692
- ? Math.floor
75693
- : Math.ceil;
75694
- const yRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
75695
- || originLocation === WaferMapOriginLocation.bottomRight
75696
- ? Math.floor
75697
- : Math.ceil;
75698
- // go to x and y scale to get the x,y values of the die.
75699
- const x = xRoundFunction(wafermap.dataManager.invertedHorizontalScale(mousePosition.x - wafermap.dataManager.margin.left));
75700
- const y = yRoundFunction(wafermap.dataManager.invertedVerticalScale(mousePosition.y - wafermap.dataManager.margin.top));
75701
- return { x, y };
75702
- }
75703
- hoversOverDie(wafermap, mousePosition) {
75704
- const rgba = wafermap.canvasContext.getImageData(mousePosition.x, mousePosition.y, 1, 1).data;
75705
- let rgbaSum = 0;
75706
- for (const color of rgba) {
75707
- rgbaSum += color;
75708
- }
75709
- return rgbaSum > 0;
75710
- }
75711
- }
75712
-
75713
- /**
75714
- * EventCoordinator deals with user interactions and events
75715
- */
75716
- class EventCoordinator {
75717
- constructor(wafermap) {
75718
- this.wafermap = wafermap;
75719
- this.onWheelMove = (event) => {
75720
- event.preventDefault();
75721
- };
75722
- this.onMouseMove = (event) => {
75723
- this.hoverHandler.mousemove(event);
75724
- };
75725
- this.onMouseOut = () => {
75726
- this.hoverHandler.mouseout();
75727
- };
75728
- this.zoomHandler = new ZoomHandler(wafermap);
75729
- this.hoverHandler = new HoverHandler(wafermap);
75730
- }
75731
- attachEvents() {
75732
- this.zoomHandler.createZoomBehavior();
75733
- this.wafermap.addEventListener('mousemove', this.onMouseMove);
75734
- this.wafermap.addEventListener('mouseout', this.onMouseOut);
75735
- this.wafermap.canvas.addEventListener('wheel', this.onWheelMove, {
75736
- passive: false
75737
- });
75738
- }
75739
- detachEvents() {
75740
- this.wafermap.removeEventListener('mousemove', this.onMouseMove);
75741
- this.wafermap.removeEventListener('mouseout', this.onMouseOut);
75742
- this.wafermap.canvas.removeEventListener('wheel', this.onWheelMove);
75743
- }
75744
- }
75745
-
75746
75599
  const trackedItems = [
75747
75600
  'highlightedTags',
75748
75601
  'canvasWidth',
@@ -76448,10 +76301,10 @@ img.ProseMirror-separator {
76448
76301
  }
76449
76302
  validateGridDimensions() {
76450
76303
  this.invalidGridDimensions = false;
76451
- if (typeof this.wafermap.gridMinX === 'undefined'
76452
- && typeof this.wafermap.gridMaxX === 'undefined'
76453
- && typeof this.wafermap.gridMinY === 'undefined'
76454
- && typeof this.wafermap.gridMaxY === 'undefined') {
76304
+ if (this.wafermap.gridMinX === undefined
76305
+ && this.wafermap.gridMaxX === undefined
76306
+ && this.wafermap.gridMinY === undefined
76307
+ && this.wafermap.gridMaxY === undefined) {
76455
76308
  this.invalidGridDimensions = false;
76456
76309
  }
76457
76310
  else if (typeof this.wafermap.gridMinX !== 'number'
@@ -76470,25 +76323,19 @@ img.ProseMirror-separator {
76470
76323
  this.invalidDiesTableSchema = false;
76471
76324
  }
76472
76325
  else {
76473
- const colIndexField = this.wafermap.diesTable.schema.fields.findIndex(f => f.name === 'colIndex');
76474
- const rowIndexField = this.wafermap.diesTable.schema.fields.findIndex(f => f.name === 'rowIndex');
76475
- const valueField = this.wafermap.diesTable.schema.fields.findIndex(f => f.name === 'value');
76476
- if (this.wafermap.diesTable.numCols < 3
76477
- || colIndexField === -1
76478
- || rowIndexField === -1
76479
- || valueField === -1
76480
- || !DataType.isInt(this.wafermap.diesTable.schema.fields[colIndexField].type)
76481
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
76482
- || this.wafermap.diesTable.schema.fields[colIndexField].type
76483
- .bitWidth !== 32
76484
- || !DataType.isInt(this.wafermap.diesTable.schema.fields[rowIndexField].type)
76485
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
76486
- || this.wafermap.diesTable.schema.fields[rowIndexField].type
76487
- .bitWidth !== 32
76488
- || !DataType.isFloat(this.wafermap.diesTable.schema.fields[valueField].type)
76489
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
76490
- || this.wafermap.diesTable.schema.fields[valueField].type
76491
- .precision !== Precision.DOUBLE) {
76326
+ const fields = this.wafermap.diesTable.schema.fields;
76327
+ const colField = fields.find(field => field.name === 'colIndex');
76328
+ const rowField = fields.find(field => field.name === 'rowIndex');
76329
+ const valueField = fields.find(field => field.name === 'value');
76330
+ if (!colField
76331
+ || !rowField
76332
+ || !valueField
76333
+ || !DataType.isInt(colField.type)
76334
+ || colField.type.bitWidth !== 32
76335
+ || !DataType.isInt(rowField.type)
76336
+ || rowField.type.bitWidth !== 32
76337
+ || !DataType.isFloat(valueField.type)
76338
+ || valueField.type.precision !== Precision.DOUBLE) {
76492
76339
  this.invalidDiesTableSchema = true;
76493
76340
  }
76494
76341
  }
@@ -76541,6 +76388,200 @@ img.ProseMirror-separator {
76541
76388
  }
76542
76389
  }
76543
76390
 
76391
+ /**
76392
+ * HoverHandler deals with user interactions and events like hovering
76393
+ */
76394
+ let HoverHandler$1 = class HoverHandler {
76395
+ constructor(wafermap) {
76396
+ this.wafermap = wafermap;
76397
+ this.onMouseMove = (event) => {
76398
+ if (this.wafermap.isExperimentalRenderer()) {
76399
+ return;
76400
+ }
76401
+ const mousePosition = {
76402
+ x: event.offsetX,
76403
+ y: event.offsetY
76404
+ };
76405
+ if (!this.hoversOverDie(mousePosition)) {
76406
+ this.wafermap.hoverDie = undefined;
76407
+ return;
76408
+ }
76409
+ // get original mouse position in case we are in zoom.
76410
+ const invertedPoint = this.wafermap.transform.invert([
76411
+ mousePosition.x,
76412
+ mousePosition.y
76413
+ ]);
76414
+ const dieCoordinates = this.calculateDieCoordinates({
76415
+ x: invertedPoint[0],
76416
+ y: invertedPoint[1]
76417
+ });
76418
+ this.wafermap.hoverDie = this.wafermap.dataManager.getWaferMapDie(dieCoordinates);
76419
+ };
76420
+ this.onMouseOut = (_event) => {
76421
+ this.wafermap.hoverDie = undefined;
76422
+ };
76423
+ }
76424
+ /**
76425
+ * @internal
76426
+ */
76427
+ connect() {
76428
+ this.wafermap.addEventListener('mousemove', this.onMouseMove);
76429
+ this.wafermap.addEventListener('mouseout', this.onMouseOut);
76430
+ }
76431
+ /**
76432
+ * @internal
76433
+ */
76434
+ disconnect() {
76435
+ this.wafermap.removeEventListener('mousemove', this.onMouseMove);
76436
+ this.wafermap.removeEventListener('mouseout', this.onMouseOut);
76437
+ }
76438
+ calculateDieCoordinates(mousePosition) {
76439
+ const originLocation = this.wafermap.originLocation;
76440
+ const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
76441
+ || originLocation === WaferMapOriginLocation.topLeft
76442
+ ? Math.floor
76443
+ : Math.ceil;
76444
+ const yRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
76445
+ || originLocation === WaferMapOriginLocation.bottomRight
76446
+ ? Math.floor
76447
+ : Math.ceil;
76448
+ // go to x and y scale to get the x,y values of the die.
76449
+ const x = xRoundFunction(this.wafermap.dataManager.invertedHorizontalScale(mousePosition.x - this.wafermap.dataManager.margin.left));
76450
+ const y = yRoundFunction(this.wafermap.dataManager.invertedVerticalScale(mousePosition.y - this.wafermap.dataManager.margin.top));
76451
+ return { x, y };
76452
+ }
76453
+ hoversOverDie(mousePosition) {
76454
+ const rgba = this.wafermap.canvasContext.getImageData(mousePosition.x, mousePosition.y, 1, 1).data;
76455
+ let rgbaSum = 0;
76456
+ for (const color of rgba) {
76457
+ rgbaSum += color;
76458
+ }
76459
+ return rgbaSum > 0;
76460
+ }
76461
+ };
76462
+
76463
+ /**
76464
+ * HoverHandler deals with user interactions and events like hovering
76465
+ */
76466
+ class HoverHandler {
76467
+ constructor(wafermap) {
76468
+ this.wafermap = wafermap;
76469
+ /**
76470
+ * @internal
76471
+ * keep public for testing until data manager refactor
76472
+ */
76473
+ this.onMouseMove = (event) => {
76474
+ if (!this.wafermap.isExperimentalRenderer()) {
76475
+ return;
76476
+ }
76477
+ // get original mouse position in case we are in zoom.
76478
+ const invertedPoint = this.wafermap.transform.invert([
76479
+ event.offsetX,
76480
+ event.offsetY
76481
+ ]);
76482
+ // does not work yet until data manager will parse diesTable
76483
+ const dieCoordinates = this.calculateDieCoordinates({
76484
+ x: invertedPoint[0],
76485
+ y: invertedPoint[1]
76486
+ });
76487
+ const colIndex = this.wafermap
76488
+ .diesTable.getChild('colIndex')
76489
+ .toArray();
76490
+ const rowIndex = this.wafermap
76491
+ .diesTable.getChild('rowIndex')
76492
+ .toArray();
76493
+ // will replace iterating with arquero filtering after fixing errors
76494
+ for (let i = 0; i < colIndex.length; i++) {
76495
+ if (colIndex[i] === dieCoordinates.x
76496
+ && rowIndex[i] === dieCoordinates.y) {
76497
+ this.wafermap.hoverDie = {
76498
+ index: i,
76499
+ x: dieCoordinates.x,
76500
+ y: dieCoordinates.y
76501
+ };
76502
+ return;
76503
+ }
76504
+ }
76505
+ this.wafermap.hoverDie = undefined;
76506
+ };
76507
+ this.onMouseOut = (_event) => {
76508
+ this.wafermap.hoverDie = undefined;
76509
+ };
76510
+ }
76511
+ /**
76512
+ * @internal
76513
+ */
76514
+ connect() {
76515
+ this.wafermap.addEventListener('mousemove', this.onMouseMove);
76516
+ this.wafermap.addEventListener('mouseout', this.onMouseOut);
76517
+ }
76518
+ /**
76519
+ * @internal
76520
+ */
76521
+ disconnect() {
76522
+ this.wafermap.removeEventListener('mousemove', this.onMouseMove);
76523
+ this.wafermap.removeEventListener('mouseout', this.onMouseOut);
76524
+ }
76525
+ calculateDieCoordinates(mousePosition) {
76526
+ const originLocation = this.wafermap.originLocation;
76527
+ const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
76528
+ || originLocation === WaferMapOriginLocation.topLeft
76529
+ ? Math.floor
76530
+ : Math.ceil;
76531
+ const yRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft
76532
+ || originLocation === WaferMapOriginLocation.bottomRight
76533
+ ? Math.floor
76534
+ : Math.ceil;
76535
+ // go to x and y scale to get the x,y values of the die.
76536
+ const x = xRoundFunction(this.wafermap.dataManager.invertedHorizontalScale(mousePosition.x - this.wafermap.dataManager.margin.left));
76537
+ const y = yRoundFunction(this.wafermap.dataManager.invertedVerticalScale(mousePosition.y - this.wafermap.dataManager.margin.top));
76538
+ return { x, y };
76539
+ }
76540
+ }
76541
+
76542
+ /**
76543
+ * ZoomHandler deals with user interactions and events like zooming
76544
+ */
76545
+ class ZoomHandler {
76546
+ constructor(wafermap) {
76547
+ this.wafermap = wafermap;
76548
+ this.scaleExtent = [1, 100];
76549
+ this.minExtentPoint = [0, 0];
76550
+ this.onWheelMove = (event) => {
76551
+ event.preventDefault();
76552
+ };
76553
+ }
76554
+ /**
76555
+ * @internal
76556
+ */
76557
+ connect() {
76558
+ this.createZoomBehavior();
76559
+ this.wafermap.addEventListener('wheel', this.onWheelMove, {
76560
+ passive: false
76561
+ });
76562
+ }
76563
+ /**
76564
+ * @internal
76565
+ */
76566
+ disconnect() {
76567
+ zoom().on('zoom', null)(select(this.wafermap));
76568
+ this.wafermap.removeEventListener('wheel', this.onWheelMove);
76569
+ }
76570
+ createZoomBehavior() {
76571
+ zoom()
76572
+ .scaleExtent(this.scaleExtent)
76573
+ .translateExtent([
76574
+ this.minExtentPoint,
76575
+ [this.wafermap.canvasWidth, this.wafermap.canvasHeight]
76576
+ ])
76577
+ .on('zoom', (event) => {
76578
+ // D3 will automatically remove existing handlers when adding new ones
76579
+ // See: https://github.com/d3/d3-zoom/blob/v3.0.0/README.md#zoom_on
76580
+ this.wafermap.transform = event.transform;
76581
+ })(select(this.wafermap));
76582
+ }
76583
+ }
76584
+
76544
76585
  /**
76545
76586
  * A nimble-styled WaferMap
76546
76587
  */
@@ -76551,7 +76592,7 @@ img.ProseMirror-separator {
76551
76592
  * @internal
76552
76593
  * needs to be initialized before the properties trigger changes
76553
76594
  */
76554
- this.waferMapUpdateTracker = new WaferMapUpdateTracker(this);
76595
+ this.waferMapUpdateTracker = new WaferMapUpdateTracker(this.asRequiredFieldsWaferMap);
76555
76596
  this.originLocation = WaferMapOriginLocation.bottomLeft;
76556
76597
  this.gridMinX = undefined;
76557
76598
  this.gridMaxX = undefined;
@@ -76565,15 +76606,15 @@ img.ProseMirror-separator {
76565
76606
  /**
76566
76607
  * @internal
76567
76608
  */
76568
- this.dataManager = new DataManager(this);
76609
+ this.dataManager = new DataManager(this.asRequiredFieldsWaferMap);
76569
76610
  /**
76570
76611
  * @internal
76571
76612
  */
76572
- this.mainRenderer = new RenderingModule(this);
76613
+ this.mainRenderer = new RenderingModule(this.asRequiredFieldsWaferMap);
76573
76614
  /**
76574
76615
  * @internal
76575
76616
  */
76576
- this.workerRenderer = new WorkerRenderer(this);
76617
+ this.workerRenderer = new WorkerRenderer(this.asRequiredFieldsWaferMap);
76577
76618
  this.renderer = this.mainRenderer;
76578
76619
  /**
76579
76620
  * @internal
@@ -76605,9 +76646,11 @@ img.ProseMirror-separator {
76605
76646
  colors: [],
76606
76647
  values: []
76607
76648
  };
76608
- this.eventCoordinator = new EventCoordinator(this);
76649
+ this.hoverHandler = new HoverHandler$1(this.asRequiredFieldsWaferMap);
76650
+ this.experimentalHoverHandler = new HoverHandler(this.asRequiredFieldsWaferMap);
76651
+ this.zoomHandler = new ZoomHandler(this.asRequiredFieldsWaferMap);
76609
76652
  this.resizeObserver = this.createResizeObserver();
76610
- this.waferMapValidator = new WaferMapValidator(this);
76653
+ this.waferMapValidator = new WaferMapValidator(this.asRequiredFieldsWaferMap);
76611
76654
  }
76612
76655
  get validity() {
76613
76656
  return this.waferMapValidator.getValidity();
@@ -76617,11 +76660,17 @@ img.ProseMirror-separator {
76617
76660
  this.canvasContext = this.canvas.getContext('2d', {
76618
76661
  willReadFrequently: true
76619
76662
  });
76663
+ this.hoverHandler.connect();
76664
+ this.experimentalHoverHandler.connect();
76665
+ this.zoomHandler.connect();
76620
76666
  this.resizeObserver.observe(this);
76621
76667
  this.waferMapUpdateTracker.trackAll();
76622
76668
  }
76623
76669
  disconnectedCallback() {
76624
76670
  super.disconnectedCallback();
76671
+ this.hoverHandler.disconnect();
76672
+ this.experimentalHoverHandler.disconnect();
76673
+ this.zoomHandler.disconnect();
76625
76674
  this.resizeObserver.unobserve(this);
76626
76675
  }
76627
76676
  /**
@@ -76637,8 +76686,12 @@ img.ProseMirror-separator {
76637
76686
  if (this.validity.invalidDiesTableSchema) {
76638
76687
  return;
76639
76688
  }
76689
+ this.renderer = this.isExperimentalRenderer()
76690
+ ? this.workerRenderer
76691
+ : this.mainRenderer;
76640
76692
  if (this.waferMapUpdateTracker.requiresEventsUpdate) {
76641
- this.eventCoordinator.detachEvents();
76693
+ // zoom translateExtent needs to be recalculated when canvas size changes
76694
+ this.zoomHandler.disconnect();
76642
76695
  if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {
76643
76696
  this.dataManager.updateContainerDimensions();
76644
76697
  this.renderer.updateSortedDiesAndDrawWafer();
@@ -76658,12 +76711,18 @@ img.ProseMirror-separator {
76658
76711
  else if (this.waferMapUpdateTracker.requiresDrawnWaferUpdate) {
76659
76712
  this.renderer.drawWafer();
76660
76713
  }
76661
- this.eventCoordinator.attachEvents();
76714
+ this.zoomHandler.connect();
76662
76715
  }
76663
76716
  else if (this.waferMapUpdateTracker.requiresRenderHoverUpdate) {
76664
76717
  this.renderer.renderHover();
76665
76718
  }
76666
76719
  }
76720
+ /**
76721
+ * @internal
76722
+ */
76723
+ isExperimentalRenderer() {
76724
+ return this.diesTable !== undefined;
76725
+ }
76667
76726
  validate() {
76668
76727
  this.waferMapValidator.validateGridDimensions();
76669
76728
  this.waferMapValidator.validateDiesTableSchema();
@@ -76726,16 +76785,10 @@ img.ProseMirror-separator {
76726
76785
  }
76727
76786
  diesChanged() {
76728
76787
  this.waferMapUpdateTracker.track('dies');
76729
- this.renderer = this.diesTable === undefined
76730
- ? this.mainRenderer
76731
- : this.workerRenderer;
76732
76788
  this.waferMapUpdateTracker.queueUpdate();
76733
76789
  }
76734
76790
  diesTableChanged() {
76735
76791
  this.waferMapUpdateTracker.track('dies');
76736
- this.renderer = this.diesTable === undefined
76737
- ? this.mainRenderer
76738
- : this.workerRenderer;
76739
76792
  this.waferMapUpdateTracker.queueUpdate();
76740
76793
  }
76741
76794
  colorScaleChanged() {
@@ -76759,6 +76812,9 @@ img.ProseMirror-separator {
76759
76812
  this.waferMapUpdateTracker.track('hoverDie');
76760
76813
  this.waferMapUpdateTracker.queueUpdate();
76761
76814
  }
76815
+ get asRequiredFieldsWaferMap() {
76816
+ return this;
76817
+ }
76762
76818
  }
76763
76819
  __decorate$1([
76764
76820
  attr({ attribute: 'origin-location' })