@ni/nimble-components 20.0.2 → 20.0.3
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.
- package/dist/all-components-bundle.js +285 -110
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +1500 -1499
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/src/wafer-map/index.d.ts +16 -9
- package/dist/esm/src/wafer-map/modules/computations.d.ts +19 -8
- package/dist/esm/src/wafer-map/modules/data-manager.d.ts +8 -1
- package/dist/esm/src/wafer-map/modules/event-coordinator.d.ts +1 -1
- package/dist/esm/src/wafer-map/modules/hover-handler.d.ts +1 -1
- package/dist/esm/src/wafer-map/modules/prerendering.d.ts +13 -6
- package/dist/esm/src/wafer-map/modules/rendering.d.ts +3 -3
- package/dist/esm/src/wafer-map/modules/wafer-map-update-tracker.d.ts +24 -0
- package/dist/esm/src/wafer-map/modules/zoom-handler.d.ts +2 -2
- package/dist/esm/wafer-map/index.d.ts +16 -9
- package/dist/esm/wafer-map/index.js +67 -41
- package/dist/esm/wafer-map/index.js.map +1 -1
- package/dist/esm/wafer-map/modules/computations.d.ts +19 -8
- package/dist/esm/wafer-map/modules/computations.js +44 -12
- package/dist/esm/wafer-map/modules/computations.js.map +1 -1
- package/dist/esm/wafer-map/modules/data-manager.d.ts +8 -1
- package/dist/esm/wafer-map/modules/data-manager.js +24 -2
- package/dist/esm/wafer-map/modules/data-manager.js.map +1 -1
- package/dist/esm/wafer-map/modules/event-coordinator.d.ts +1 -1
- package/dist/esm/wafer-map/modules/event-coordinator.js +8 -8
- package/dist/esm/wafer-map/modules/event-coordinator.js.map +1 -1
- package/dist/esm/wafer-map/modules/hover-handler.d.ts +1 -1
- package/dist/esm/wafer-map/modules/hover-handler.js +9 -9
- package/dist/esm/wafer-map/modules/hover-handler.js.map +1 -1
- package/dist/esm/wafer-map/modules/prerendering.d.ts +13 -6
- package/dist/esm/wafer-map/modules/prerendering.js +29 -8
- package/dist/esm/wafer-map/modules/prerendering.js.map +1 -1
- package/dist/esm/wafer-map/modules/rendering.d.ts +3 -3
- package/dist/esm/wafer-map/modules/rendering.js +15 -13
- package/dist/esm/wafer-map/modules/rendering.js.map +1 -1
- package/dist/esm/wafer-map/modules/wafer-map-update-tracker.d.ts +24 -0
- package/dist/esm/wafer-map/modules/wafer-map-update-tracker.js +77 -0
- package/dist/esm/wafer-map/modules/wafer-map-update-tracker.js.map +1 -0
- package/dist/esm/wafer-map/modules/zoom-handler.d.ts +2 -2
- package/dist/esm/wafer-map/modules/zoom-handler.js +13 -15
- package/dist/esm/wafer-map/modules/zoom-handler.js.map +1 -1
- package/package.json +1 -1
|
@@ -16288,7 +16288,7 @@
|
|
|
16288
16288
|
|
|
16289
16289
|
/**
|
|
16290
16290
|
* Do not edit directly
|
|
16291
|
-
* Generated on
|
|
16291
|
+
* Generated on Tue, 01 Aug 2023 16:23:07 GMT
|
|
16292
16292
|
*/
|
|
16293
16293
|
|
|
16294
16294
|
const Information100DarkUi = "#a46eff";
|
|
@@ -46785,7 +46785,7 @@
|
|
|
46785
46785
|
}
|
|
46786
46786
|
return false;
|
|
46787
46787
|
};
|
|
46788
|
-
const trackedItems = [
|
|
46788
|
+
const trackedItems$1 = [
|
|
46789
46789
|
'rowIds',
|
|
46790
46790
|
'groupRows',
|
|
46791
46791
|
'columnIds',
|
|
@@ -46801,7 +46801,7 @@
|
|
|
46801
46801
|
*/
|
|
46802
46802
|
class TableUpdateTracker extends UpdateTracker {
|
|
46803
46803
|
constructor(table) {
|
|
46804
|
-
super(trackedItems);
|
|
46804
|
+
super(trackedItems$1);
|
|
46805
46805
|
this.table = table;
|
|
46806
46806
|
this.updateQueued = false;
|
|
46807
46807
|
}
|
|
@@ -54215,13 +54215,39 @@
|
|
|
54215
54215
|
*/
|
|
54216
54216
|
class Computations {
|
|
54217
54217
|
constructor(wafermap) {
|
|
54218
|
+
this.wafermap = wafermap;
|
|
54218
54219
|
this.defaultPadding = 0;
|
|
54219
54220
|
this.baseMarginPercentage = 0.04;
|
|
54221
|
+
}
|
|
54222
|
+
get containerDimensions() {
|
|
54223
|
+
return this._containerDimensions;
|
|
54224
|
+
}
|
|
54225
|
+
get dieDimensions() {
|
|
54226
|
+
return this._dieDimensions;
|
|
54227
|
+
}
|
|
54228
|
+
get radius() {
|
|
54229
|
+
return this._radius;
|
|
54230
|
+
}
|
|
54231
|
+
get margin() {
|
|
54232
|
+
return this._margin;
|
|
54233
|
+
}
|
|
54234
|
+
get horizontalScale() {
|
|
54235
|
+
return this._horizontalScale;
|
|
54236
|
+
}
|
|
54237
|
+
get verticalScale() {
|
|
54238
|
+
return this._verticalScale;
|
|
54239
|
+
}
|
|
54240
|
+
get invertedHorizontalScale() {
|
|
54241
|
+
return this._invertedHorizontalScale;
|
|
54242
|
+
}
|
|
54243
|
+
get invertedVerticalScale() {
|
|
54244
|
+
return this._invertedVerticalScale;
|
|
54245
|
+
}
|
|
54246
|
+
updateContainerDimensions() {
|
|
54220
54247
|
const canvasDimensions = {
|
|
54221
|
-
width: wafermap.canvasWidth,
|
|
54222
|
-
height: wafermap.canvasHeight
|
|
54248
|
+
width: this.wafermap.canvasWidth,
|
|
54249
|
+
height: this.wafermap.canvasHeight
|
|
54223
54250
|
};
|
|
54224
|
-
const gridDimensions = this.calculateGridDimensions(wafermap.dies);
|
|
54225
54251
|
const canvasDiameter = Math.min(canvasDimensions.width, canvasDimensions.height);
|
|
54226
54252
|
const canvasMargin = {
|
|
54227
54253
|
top: (canvasDimensions.height - canvasDiameter) / 2,
|
|
@@ -54235,20 +54261,26 @@
|
|
|
54235
54261
|
bottom: canvasDiameter * this.baseMarginPercentage,
|
|
54236
54262
|
left: canvasDiameter * this.baseMarginPercentage
|
|
54237
54263
|
};
|
|
54238
|
-
this.
|
|
54239
|
-
this.
|
|
54240
|
-
const containerDiameter = Math.min(this.
|
|
54264
|
+
this._margin = this.calculateMarginAddition(baseMargin, canvasMargin);
|
|
54265
|
+
this._containerDimensions = this.calculateContainerDimensions(canvasDimensions, this._margin);
|
|
54266
|
+
const containerDiameter = Math.min(this._containerDimensions.width, this._containerDimensions.height);
|
|
54267
|
+
this._radius = containerDiameter / 2;
|
|
54268
|
+
this.updateScales();
|
|
54269
|
+
}
|
|
54270
|
+
updateScales() {
|
|
54271
|
+
const containerDiameter = Math.min(this._containerDimensions.width, this._containerDimensions.height);
|
|
54272
|
+
const gridDimensions = this.calculateGridDimensions(this.wafermap.dies);
|
|
54241
54273
|
// this scale is used for positioning the dies on the canvas
|
|
54242
|
-
|
|
54243
|
-
this.
|
|
54274
|
+
const quadrant = this.wafermap.quadrant;
|
|
54275
|
+
this._horizontalScale = this.createHorizontalScale(quadrant, gridDimensions, containerDiameter);
|
|
54276
|
+
this._invertedHorizontalScale = this.createInvertedHorizontalScale(quadrant, gridDimensions, containerDiameter);
|
|
54244
54277
|
// this scale is used for positioning the dies on the canvas
|
|
54245
|
-
this.
|
|
54246
|
-
this.
|
|
54247
|
-
this.
|
|
54278
|
+
this._verticalScale = this.createVerticalScale(quadrant, gridDimensions, containerDiameter);
|
|
54279
|
+
this._invertedVerticalScale = this.createInvertedVerticalScale(quadrant, gridDimensions, containerDiameter);
|
|
54280
|
+
this._dieDimensions = {
|
|
54248
54281
|
width: this.horizontalScale.bandwidth(),
|
|
54249
54282
|
height: this.verticalScale.bandwidth()
|
|
54250
54283
|
};
|
|
54251
|
-
this.radius = containerDiameter / 2;
|
|
54252
54284
|
}
|
|
54253
54285
|
calculateGridDimensions(dies) {
|
|
54254
54286
|
if (dies.length === 0 || dies[0] === undefined) {
|
|
@@ -54338,22 +54370,43 @@
|
|
|
54338
54370
|
* Prerendering prepares render-ready dies data to be used by the rendering module
|
|
54339
54371
|
*/
|
|
54340
54372
|
class Prerendering {
|
|
54341
|
-
constructor(wafermap,
|
|
54373
|
+
constructor(wafermap, dataManager) {
|
|
54374
|
+
this.wafermap = wafermap;
|
|
54375
|
+
this.dataManager = dataManager;
|
|
54342
54376
|
this.fontSizeFactor = 0.8;
|
|
54343
54377
|
this.nonHighlightedOpacity = 0.3;
|
|
54344
54378
|
this.emptyDieColor = 'rgba(218,223,236,1)';
|
|
54345
54379
|
this.nanDieColor = 'rgba(122,122,122,1)';
|
|
54346
|
-
|
|
54347
|
-
|
|
54348
|
-
this.
|
|
54349
|
-
|
|
54380
|
+
}
|
|
54381
|
+
get labelsFontSize() {
|
|
54382
|
+
return this._labelsFontSize;
|
|
54383
|
+
}
|
|
54384
|
+
get diesRenderInfo() {
|
|
54385
|
+
return this._diesRenderInfo;
|
|
54386
|
+
}
|
|
54387
|
+
updateLabelsFontSize() {
|
|
54388
|
+
this._labelsFontSize = this.calculateLabelsFontSize(this.dataManager.dieDimensions, this.wafermap.maxCharacters);
|
|
54389
|
+
this.updateDiesRenderInfo();
|
|
54390
|
+
}
|
|
54391
|
+
updateDiesRenderInfo() {
|
|
54392
|
+
this.d3ColorScale = this.createD3ColorScale(this.wafermap.colorScale, this.wafermap.colorScaleMode);
|
|
54393
|
+
const margin = this.dataManager.margin;
|
|
54394
|
+
const horizontalScale = this.dataManager.horizontalScale;
|
|
54395
|
+
const verticalScale = this.dataManager.verticalScale;
|
|
54396
|
+
const colorScaleMode = this.wafermap.colorScaleMode;
|
|
54397
|
+
const highlightedValues = this.wafermap.highlightedValues;
|
|
54398
|
+
const maxCharacters = this.wafermap.maxCharacters;
|
|
54399
|
+
const dieLabelsHidden = this.wafermap.dieLabelsHidden;
|
|
54400
|
+
const dieLabelsSuffix = this.wafermap.dieLabelsSuffix;
|
|
54401
|
+
this._diesRenderInfo = [];
|
|
54402
|
+
for (const die of this.wafermap.dies) {
|
|
54350
54403
|
const scaledX = horizontalScale(die.x) ?? 0;
|
|
54351
54404
|
const scaledY = verticalScale(die.y) ?? 0;
|
|
54352
|
-
this.
|
|
54405
|
+
this._diesRenderInfo.push({
|
|
54353
54406
|
x: scaledX + margin.right,
|
|
54354
54407
|
y: scaledY + margin.top,
|
|
54355
|
-
fillStyle: this.calculateFillStyle(die.value,
|
|
54356
|
-
text: this.buildLabel(die.value,
|
|
54408
|
+
fillStyle: this.calculateFillStyle(die.value, colorScaleMode, highlightedValues),
|
|
54409
|
+
text: this.buildLabel(die.value, maxCharacters, dieLabelsHidden, dieLabelsSuffix)
|
|
54357
54410
|
});
|
|
54358
54411
|
}
|
|
54359
54412
|
}
|
|
@@ -54426,9 +54479,9 @@
|
|
|
54426
54479
|
*/
|
|
54427
54480
|
class DataManager {
|
|
54428
54481
|
constructor(wafermap) {
|
|
54482
|
+
this.wafermap = wafermap;
|
|
54429
54483
|
this.computations = new Computations(wafermap);
|
|
54430
|
-
this.prerendering = new Prerendering(wafermap, this
|
|
54431
|
-
this.dataMap = new Map(wafermap.dies.map(die => [`${die.x}_${die.y}`, die]));
|
|
54484
|
+
this.prerendering = new Prerendering(wafermap, this);
|
|
54432
54485
|
}
|
|
54433
54486
|
get containerDimensions() {
|
|
54434
54487
|
return this.computations.containerDimensions;
|
|
@@ -54460,9 +54513,31 @@
|
|
|
54460
54513
|
get diesRenderInfo() {
|
|
54461
54514
|
return this.prerendering.diesRenderInfo;
|
|
54462
54515
|
}
|
|
54516
|
+
get data() {
|
|
54517
|
+
return this.dataMap;
|
|
54518
|
+
}
|
|
54519
|
+
updateContainerDimensions() {
|
|
54520
|
+
this.computations.updateContainerDimensions();
|
|
54521
|
+
this.updateDataMap();
|
|
54522
|
+
this.updateLabelsFontSize();
|
|
54523
|
+
}
|
|
54524
|
+
updateScales() {
|
|
54525
|
+
this.computations.updateScales();
|
|
54526
|
+
this.updateDataMap();
|
|
54527
|
+
this.updateLabelsFontSize();
|
|
54528
|
+
}
|
|
54529
|
+
updateLabelsFontSize() {
|
|
54530
|
+
this.prerendering.updateLabelsFontSize();
|
|
54531
|
+
}
|
|
54532
|
+
updateDiesRenderInfo() {
|
|
54533
|
+
this.prerendering.updateDiesRenderInfo();
|
|
54534
|
+
}
|
|
54463
54535
|
getWaferMapDie(point) {
|
|
54464
54536
|
return this.dataMap.get(`${point.x}_${point.y}`);
|
|
54465
54537
|
}
|
|
54538
|
+
updateDataMap() {
|
|
54539
|
+
this.dataMap = new Map(this.wafermap.dies.map(die => [`${die.x}_${die.y}`, die]));
|
|
54540
|
+
}
|
|
54466
54541
|
}
|
|
54467
54542
|
|
|
54468
54543
|
/**
|
|
@@ -54471,14 +54546,13 @@
|
|
|
54471
54546
|
class RenderingModule {
|
|
54472
54547
|
constructor(wafermap) {
|
|
54473
54548
|
this.wafermap = wafermap;
|
|
54474
|
-
this.
|
|
54475
|
-
this.dimensions = wafermap.dataManager.dieDimensions;
|
|
54476
|
-
this.labelFontSize = wafermap.dataManager.labelsFontSize;
|
|
54549
|
+
this.minDieDim = 50;
|
|
54477
54550
|
}
|
|
54478
54551
|
drawWafer() {
|
|
54479
54552
|
this.wafermap.canvasContext.save();
|
|
54480
54553
|
this.clearCanvas();
|
|
54481
54554
|
this.scaleCanvas();
|
|
54555
|
+
this.sortDies();
|
|
54482
54556
|
this.renderDies();
|
|
54483
54557
|
this.renderText();
|
|
54484
54558
|
this.wafermap.canvasContext.restore();
|
|
@@ -54506,8 +54580,8 @@
|
|
|
54506
54580
|
}
|
|
54507
54581
|
return '';
|
|
54508
54582
|
}
|
|
54509
|
-
|
|
54510
|
-
this.dies.sort((a, b) => {
|
|
54583
|
+
sortDies() {
|
|
54584
|
+
this.dies = this.wafermap.dataManager.diesRenderInfo.sort((a, b) => {
|
|
54511
54585
|
if (a.fillStyle > b.fillStyle) {
|
|
54512
54586
|
return 1;
|
|
54513
54587
|
}
|
|
@@ -54516,6 +54590,8 @@
|
|
|
54516
54590
|
}
|
|
54517
54591
|
return 0;
|
|
54518
54592
|
});
|
|
54593
|
+
}
|
|
54594
|
+
renderDies() {
|
|
54519
54595
|
let prev;
|
|
54520
54596
|
for (const die of this.dies) {
|
|
54521
54597
|
if (!prev) {
|
|
@@ -54524,25 +54600,26 @@
|
|
|
54524
54600
|
if (prev && die.fillStyle !== prev.fillStyle && die.fillStyle) {
|
|
54525
54601
|
this.wafermap.canvasContext.fillStyle = die.fillStyle;
|
|
54526
54602
|
}
|
|
54527
|
-
this.wafermap.canvasContext.fillRect(die.x, die.y, this.
|
|
54603
|
+
this.wafermap.canvasContext.fillRect(die.x, die.y, this.wafermap.dataManager.dieDimensions.width, this.wafermap.dataManager.dieDimensions.height);
|
|
54528
54604
|
prev = die;
|
|
54529
54605
|
}
|
|
54530
54606
|
}
|
|
54531
54607
|
renderText() {
|
|
54532
|
-
const dieSize = this.
|
|
54533
|
-
* this.
|
|
54608
|
+
const dieSize = this.wafermap.dataManager.dieDimensions.width
|
|
54609
|
+
* this.wafermap.dataManager.dieDimensions.height
|
|
54534
54610
|
* (this.wafermap.transform.k || 1);
|
|
54535
|
-
const fontsize = this.
|
|
54611
|
+
const fontsize = this.wafermap.dataManager.labelsFontSize;
|
|
54536
54612
|
this.wafermap.canvasContext.font = `${fontsize.toString()}px sans-serif`;
|
|
54537
54613
|
this.wafermap.canvasContext.fillStyle = '#ffffff';
|
|
54538
54614
|
this.wafermap.canvasContext.textAlign = 'center';
|
|
54539
54615
|
this.wafermap.canvasContext.lineCap = 'butt';
|
|
54540
54616
|
const approxTextHeight = this.wafermap.canvasContext.measureText('M');
|
|
54541
|
-
|
|
54617
|
+
const dieDimensions = this.wafermap.dataManager.dieDimensions;
|
|
54618
|
+
if (dieSize >= this.minDieDim) {
|
|
54542
54619
|
for (const die of this.dies) {
|
|
54543
|
-
this.wafermap.canvasContext.fillText(die.text, die.x +
|
|
54544
|
-
+
|
|
54545
|
-
+ approxTextHeight.width / 2,
|
|
54620
|
+
this.wafermap.canvasContext.fillText(die.text, die.x + dieDimensions.width / 2, die.y
|
|
54621
|
+
+ dieDimensions.height / 2
|
|
54622
|
+
+ approxTextHeight.width / 2, dieDimensions.width - (dieDimensions.width / 100) * 20);
|
|
54546
54623
|
}
|
|
54547
54624
|
}
|
|
54548
54625
|
}
|
|
@@ -54565,22 +54642,9 @@
|
|
|
54565
54642
|
this.minScale = 1.1;
|
|
54566
54643
|
this.minExtentPoint = [-100, -100];
|
|
54567
54644
|
this.extentPadding = 100;
|
|
54568
|
-
this.zoomBehavior = this.createZoomBehavior();
|
|
54569
|
-
this.zoomBehavior(select(this.wafermap.canvas));
|
|
54570
|
-
}
|
|
54571
|
-
rescale(event) {
|
|
54572
|
-
const transform = event.transform;
|
|
54573
|
-
if (transform.k === this.minScale) {
|
|
54574
|
-
this.zoomTransform = identity$2;
|
|
54575
|
-
this.zoomBehavior.transform(select(this.wafermap.canvas), identity$2);
|
|
54576
|
-
}
|
|
54577
|
-
else {
|
|
54578
|
-
this.zoomTransform = transform;
|
|
54579
|
-
}
|
|
54580
|
-
this.wafermap.transform = this.zoomTransform;
|
|
54581
54645
|
}
|
|
54582
54646
|
createZoomBehavior() {
|
|
54583
|
-
|
|
54647
|
+
this.zoomBehavior = zoom()
|
|
54584
54648
|
.scaleExtent([
|
|
54585
54649
|
1.1,
|
|
54586
54650
|
this.getZoomMax(this.wafermap.canvasWidth * this.wafermap.canvasHeight, this.wafermap.dataManager.containerDimensions.width
|
|
@@ -54603,7 +54667,18 @@
|
|
|
54603
54667
|
// See: https://github.com/d3/d3-zoom/blob/v3.0.0/README.md#zoom_on
|
|
54604
54668
|
this.rescale(event);
|
|
54605
54669
|
});
|
|
54606
|
-
|
|
54670
|
+
this.zoomBehavior(select(this.wafermap.canvas));
|
|
54671
|
+
}
|
|
54672
|
+
rescale(event) {
|
|
54673
|
+
const transform = event.transform;
|
|
54674
|
+
if (transform.k === this.minScale) {
|
|
54675
|
+
this.zoomTransform = identity$2;
|
|
54676
|
+
this.zoomBehavior.transform(select(this.wafermap.canvas), identity$2);
|
|
54677
|
+
}
|
|
54678
|
+
else {
|
|
54679
|
+
this.zoomTransform = transform;
|
|
54680
|
+
}
|
|
54681
|
+
this.wafermap.transform = this.zoomTransform;
|
|
54607
54682
|
}
|
|
54608
54683
|
getZoomMax(canvasArea, dataArea) {
|
|
54609
54684
|
return Math.ceil((dataArea / canvasArea) * 100);
|
|
@@ -54622,7 +54697,7 @@
|
|
|
54622
54697
|
x: event.offsetX,
|
|
54623
54698
|
y: event.offsetY
|
|
54624
54699
|
};
|
|
54625
|
-
if (!this.hoversOverDie(mousePosition)) {
|
|
54700
|
+
if (!this.hoversOverDie(this.wafermap, mousePosition)) {
|
|
54626
54701
|
this.wafermap.hoverDie = undefined;
|
|
54627
54702
|
return;
|
|
54628
54703
|
}
|
|
@@ -54631,17 +54706,17 @@
|
|
|
54631
54706
|
mousePosition.x,
|
|
54632
54707
|
mousePosition.y
|
|
54633
54708
|
]);
|
|
54634
|
-
const dieCoordinates = this.calculateDieCoordinates({
|
|
54709
|
+
const dieCoordinates = this.calculateDieCoordinates(this.wafermap, {
|
|
54635
54710
|
x: invertedPoint[0],
|
|
54636
54711
|
y: invertedPoint[1]
|
|
54637
54712
|
});
|
|
54638
54713
|
this.wafermap.hoverDie = this.wafermap.dataManager.getWaferMapDie(dieCoordinates);
|
|
54639
54714
|
}
|
|
54640
|
-
mouseout(
|
|
54715
|
+
mouseout() {
|
|
54641
54716
|
this.wafermap.hoverDie = undefined;
|
|
54642
54717
|
}
|
|
54643
|
-
calculateDieCoordinates(mousePosition) {
|
|
54644
|
-
const axisLocation =
|
|
54718
|
+
calculateDieCoordinates(wafermap, mousePosition) {
|
|
54719
|
+
const axisLocation = wafermap.quadrant;
|
|
54645
54720
|
const xRoundFunction = axisLocation === WaferMapQuadrant.bottomLeft
|
|
54646
54721
|
|| axisLocation === WaferMapQuadrant.topLeft
|
|
54647
54722
|
? Math.floor
|
|
@@ -54651,12 +54726,12 @@
|
|
|
54651
54726
|
? Math.floor
|
|
54652
54727
|
: Math.ceil;
|
|
54653
54728
|
// go to x and y scale to get the x,y values of the die.
|
|
54654
|
-
const x = xRoundFunction(
|
|
54655
|
-
const y = yRoundFunction(
|
|
54729
|
+
const x = xRoundFunction(wafermap.dataManager.invertedHorizontalScale(mousePosition.x - wafermap.dataManager.margin.left));
|
|
54730
|
+
const y = yRoundFunction(wafermap.dataManager.invertedVerticalScale(mousePosition.y - wafermap.dataManager.margin.top));
|
|
54656
54731
|
return { x, y };
|
|
54657
54732
|
}
|
|
54658
|
-
hoversOverDie(mousePosition) {
|
|
54659
|
-
const rgba =
|
|
54733
|
+
hoversOverDie(wafermap, mousePosition) {
|
|
54734
|
+
const rgba = wafermap.canvasContext.getImageData(mousePosition.x, mousePosition.y, 1, 1).data;
|
|
54660
54735
|
let rgbaSum = 0;
|
|
54661
54736
|
for (const color of rgba) {
|
|
54662
54737
|
rgbaSum += color;
|
|
@@ -54677,25 +54752,100 @@
|
|
|
54677
54752
|
this.onMouseMove = (event) => {
|
|
54678
54753
|
this.hoverHandler.mousemove(event);
|
|
54679
54754
|
};
|
|
54680
|
-
this.onMouseOut = (
|
|
54681
|
-
this.hoverHandler.mouseout(
|
|
54755
|
+
this.onMouseOut = () => {
|
|
54756
|
+
this.hoverHandler.mouseout();
|
|
54682
54757
|
};
|
|
54683
54758
|
this.zoomHandler = new ZoomHandler(wafermap);
|
|
54684
54759
|
this.hoverHandler = new HoverHandler(wafermap);
|
|
54685
|
-
this.attachEvents();
|
|
54686
|
-
}
|
|
54687
|
-
detachEvents() {
|
|
54688
|
-
this.wafermap.removeEventListener('mousemove', this.onMouseMove);
|
|
54689
|
-
this.wafermap.removeEventListener('mouseout', this.onMouseOut);
|
|
54690
|
-
this.wafermap.canvas.removeEventListener('wheel', this.onWheelMove);
|
|
54691
54760
|
}
|
|
54692
54761
|
attachEvents() {
|
|
54762
|
+
this.zoomHandler.createZoomBehavior();
|
|
54693
54763
|
this.wafermap.addEventListener('mousemove', this.onMouseMove);
|
|
54694
54764
|
this.wafermap.addEventListener('mouseout', this.onMouseOut);
|
|
54695
54765
|
this.wafermap.canvas.addEventListener('wheel', this.onWheelMove, {
|
|
54696
54766
|
passive: false
|
|
54697
54767
|
});
|
|
54698
54768
|
}
|
|
54769
|
+
detachEvents() {
|
|
54770
|
+
this.wafermap.removeEventListener('mousemove', this.onMouseMove);
|
|
54771
|
+
this.wafermap.removeEventListener('mouseout', this.onMouseOut);
|
|
54772
|
+
this.wafermap.canvas.removeEventListener('wheel', this.onWheelMove);
|
|
54773
|
+
}
|
|
54774
|
+
}
|
|
54775
|
+
|
|
54776
|
+
const trackedItems = [
|
|
54777
|
+
'canvasWidth',
|
|
54778
|
+
'canvasHeight',
|
|
54779
|
+
'quadrant',
|
|
54780
|
+
'dies',
|
|
54781
|
+
'maxCharacters',
|
|
54782
|
+
'colorScale',
|
|
54783
|
+
'colorScaleMode',
|
|
54784
|
+
'highlightedValues',
|
|
54785
|
+
'dieLabelsHidden',
|
|
54786
|
+
'dieLabelsSuffix',
|
|
54787
|
+
'transform',
|
|
54788
|
+
'hoverDie'
|
|
54789
|
+
];
|
|
54790
|
+
/**
|
|
54791
|
+
* Helper class to track what updates are needed to the wafer based on configuration
|
|
54792
|
+
* changes.
|
|
54793
|
+
*/
|
|
54794
|
+
class WaferMapUpdateTracker extends UpdateTracker {
|
|
54795
|
+
constructor(wafermap) {
|
|
54796
|
+
super(trackedItems);
|
|
54797
|
+
this.wafermap = wafermap;
|
|
54798
|
+
this.updateQueued = false;
|
|
54799
|
+
}
|
|
54800
|
+
get requiresEventsUpdate() {
|
|
54801
|
+
return (this.isTracked('canvasWidth')
|
|
54802
|
+
|| this.isTracked('canvasHeight')
|
|
54803
|
+
|| this.isTracked('quadrant')
|
|
54804
|
+
|| this.isTracked('dies')
|
|
54805
|
+
|| this.isTracked('maxCharacters')
|
|
54806
|
+
|| this.isTracked('colorScale')
|
|
54807
|
+
|| this.isTracked('colorScaleMode')
|
|
54808
|
+
|| this.isTracked('highlightedValues')
|
|
54809
|
+
|| this.isTracked('dieLabelsHidden')
|
|
54810
|
+
|| this.isTracked('dieLabelsSuffix')
|
|
54811
|
+
|| this.isTracked('transform'));
|
|
54812
|
+
}
|
|
54813
|
+
get requiresContainerDimensionsUpdate() {
|
|
54814
|
+
return this.isTracked('canvasWidth') || this.isTracked('canvasHeight');
|
|
54815
|
+
}
|
|
54816
|
+
get requiresScalesUpdate() {
|
|
54817
|
+
return this.isTracked('quadrant') || this.isTracked('dies');
|
|
54818
|
+
}
|
|
54819
|
+
get requiresLabelsFontSizeUpdate() {
|
|
54820
|
+
return this.isTracked('maxCharacters');
|
|
54821
|
+
}
|
|
54822
|
+
get requiresDiesRenderInfoUpdate() {
|
|
54823
|
+
return (this.isTracked('colorScale')
|
|
54824
|
+
|| this.isTracked('colorScaleMode')
|
|
54825
|
+
|| this.isTracked('highlightedValues')
|
|
54826
|
+
|| this.isTracked('dieLabelsHidden')
|
|
54827
|
+
|| this.isTracked('dieLabelsSuffix'));
|
|
54828
|
+
}
|
|
54829
|
+
get requiresRenderHoverUpdate() {
|
|
54830
|
+
return this.isTracked('hoverDie');
|
|
54831
|
+
}
|
|
54832
|
+
/**
|
|
54833
|
+
* Queues an update using the DOM and until the update is run no other updates are queued.
|
|
54834
|
+
* After the update is finished, all the tracked items are reset.
|
|
54835
|
+
*/
|
|
54836
|
+
queueUpdate() {
|
|
54837
|
+
if (!this.wafermap.$fastController.isConnected) {
|
|
54838
|
+
return;
|
|
54839
|
+
}
|
|
54840
|
+
if (!this.updateQueued) {
|
|
54841
|
+
this.updateQueued = true;
|
|
54842
|
+
DOM.queueUpdate(() => {
|
|
54843
|
+
this.wafermap.update();
|
|
54844
|
+
this.untrackAll();
|
|
54845
|
+
this.updateQueued = false;
|
|
54846
|
+
});
|
|
54847
|
+
}
|
|
54848
|
+
}
|
|
54699
54849
|
}
|
|
54700
54850
|
|
|
54701
54851
|
/**
|
|
@@ -54704,12 +54854,25 @@
|
|
|
54704
54854
|
class WaferMap extends FoundationElement {
|
|
54705
54855
|
constructor() {
|
|
54706
54856
|
super(...arguments);
|
|
54857
|
+
/**
|
|
54858
|
+
* @internal
|
|
54859
|
+
* needs to be initialized before the properties trigger changes
|
|
54860
|
+
*/
|
|
54861
|
+
this.waferMapUpdateTracker = new WaferMapUpdateTracker(this);
|
|
54707
54862
|
this.quadrant = WaferMapQuadrant.topLeft;
|
|
54708
54863
|
this.orientation = WaferMapOrientation.top;
|
|
54709
54864
|
this.maxCharacters = 4;
|
|
54710
54865
|
this.dieLabelsHidden = false;
|
|
54711
54866
|
this.dieLabelsSuffix = '';
|
|
54712
54867
|
this.colorScaleMode = WaferMapColorScaleMode.linear;
|
|
54868
|
+
/**
|
|
54869
|
+
* @internal
|
|
54870
|
+
*/
|
|
54871
|
+
this.dataManager = new DataManager(this);
|
|
54872
|
+
/**
|
|
54873
|
+
* @internal
|
|
54874
|
+
*/
|
|
54875
|
+
this.renderer = new RenderingModule(this);
|
|
54713
54876
|
/**
|
|
54714
54877
|
* @internal
|
|
54715
54878
|
*/
|
|
@@ -54740,13 +54903,16 @@
|
|
|
54740
54903
|
colors: [],
|
|
54741
54904
|
values: []
|
|
54742
54905
|
};
|
|
54906
|
+
this.eventCoordinator = new EventCoordinator(this);
|
|
54907
|
+
this.resizeObserver = this.createResizeObserver();
|
|
54743
54908
|
}
|
|
54744
54909
|
connectedCallback() {
|
|
54745
54910
|
super.connectedCallback();
|
|
54746
54911
|
this.canvasContext = this.canvas.getContext('2d', {
|
|
54747
54912
|
willReadFrequently: true
|
|
54748
54913
|
});
|
|
54749
|
-
this.resizeObserver
|
|
54914
|
+
this.resizeObserver.observe(this);
|
|
54915
|
+
this.waferMapUpdateTracker.trackAll();
|
|
54750
54916
|
}
|
|
54751
54917
|
disconnectedCallback() {
|
|
54752
54918
|
super.disconnectedCallback();
|
|
@@ -54754,32 +54920,33 @@
|
|
|
54754
54920
|
}
|
|
54755
54921
|
/**
|
|
54756
54922
|
* @internal
|
|
54923
|
+
* Update function called when an update is queued.
|
|
54924
|
+
* It will check which updates are needed based on which properties have changed.
|
|
54925
|
+
* Each update represents a different starting point of the same sequential update flow.
|
|
54926
|
+
* The updates snowball one after the other, this function only choses the 'altitude'.
|
|
54927
|
+
* The hover does not require an event update, but it's also the last update in the sequence.
|
|
54757
54928
|
*/
|
|
54758
|
-
|
|
54759
|
-
this.
|
|
54760
|
-
|
|
54761
|
-
|
|
54762
|
-
|
|
54763
|
-
|
|
54764
|
-
|
|
54765
|
-
|
|
54766
|
-
|
|
54767
|
-
|
|
54768
|
-
|
|
54769
|
-
|
|
54929
|
+
update() {
|
|
54930
|
+
if (this.waferMapUpdateTracker.requiresEventsUpdate) {
|
|
54931
|
+
this.eventCoordinator.detachEvents();
|
|
54932
|
+
if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {
|
|
54933
|
+
this.dataManager.updateContainerDimensions();
|
|
54934
|
+
}
|
|
54935
|
+
else if (this.waferMapUpdateTracker.requiresScalesUpdate) {
|
|
54936
|
+
this.dataManager.updateScales();
|
|
54937
|
+
}
|
|
54938
|
+
else if (this.waferMapUpdateTracker.requiresLabelsFontSizeUpdate) {
|
|
54939
|
+
this.dataManager.updateLabelsFontSize();
|
|
54940
|
+
}
|
|
54941
|
+
else if (this.waferMapUpdateTracker.requiresDiesRenderInfoUpdate) {
|
|
54942
|
+
this.dataManager.updateDiesRenderInfo();
|
|
54943
|
+
}
|
|
54944
|
+
this.renderer.drawWafer();
|
|
54945
|
+
this.eventCoordinator.attachEvents();
|
|
54770
54946
|
}
|
|
54771
|
-
|
|
54772
|
-
|
|
54773
|
-
if (!this.$fastController.isConnected) {
|
|
54774
|
-
return;
|
|
54947
|
+
else if (this.waferMapUpdateTracker.requiresRenderHoverUpdate) {
|
|
54948
|
+
this.renderer.renderHover();
|
|
54775
54949
|
}
|
|
54776
|
-
DOM.queueUpdate(() => this.renderer?.renderHover());
|
|
54777
|
-
}
|
|
54778
|
-
initializeInternalModules() {
|
|
54779
|
-
this.eventCoordinator?.detachEvents();
|
|
54780
|
-
this.dataManager = new DataManager(this);
|
|
54781
|
-
this.renderer = new RenderingModule(this);
|
|
54782
|
-
this.eventCoordinator = new EventCoordinator(this);
|
|
54783
54950
|
}
|
|
54784
54951
|
createResizeObserver() {
|
|
54785
54952
|
const resizeObserver = new ResizeObserver(entries => {
|
|
@@ -54795,48 +54962,56 @@
|
|
|
54795
54962
|
this.canvasWidth = width;
|
|
54796
54963
|
this.canvasHeight = height;
|
|
54797
54964
|
});
|
|
54798
|
-
resizeObserver.observe(this);
|
|
54799
54965
|
return resizeObserver;
|
|
54800
54966
|
}
|
|
54801
54967
|
quadrantChanged() {
|
|
54802
|
-
this.
|
|
54803
|
-
|
|
54804
|
-
orientationChanged() {
|
|
54805
|
-
this.queueRender();
|
|
54968
|
+
this.waferMapUpdateTracker.track('quadrant');
|
|
54969
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54806
54970
|
}
|
|
54807
54971
|
maxCharactersChanged() {
|
|
54808
|
-
this.
|
|
54972
|
+
this.waferMapUpdateTracker.track('maxCharacters');
|
|
54973
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54809
54974
|
}
|
|
54810
54975
|
dieLabelsHiddenChanged() {
|
|
54811
|
-
this.
|
|
54976
|
+
this.waferMapUpdateTracker.track('dieLabelsHidden');
|
|
54977
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54812
54978
|
}
|
|
54813
54979
|
dieLabelsSuffixChanged() {
|
|
54814
|
-
this.
|
|
54980
|
+
this.waferMapUpdateTracker.track('dieLabelsSuffix');
|
|
54981
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54815
54982
|
}
|
|
54816
54983
|
colorScaleModeChanged() {
|
|
54817
|
-
this.
|
|
54984
|
+
this.waferMapUpdateTracker.track('colorScaleMode');
|
|
54985
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54818
54986
|
}
|
|
54819
54987
|
highlightedValuesChanged() {
|
|
54820
|
-
this.
|
|
54988
|
+
this.waferMapUpdateTracker.track('highlightedValues');
|
|
54989
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54821
54990
|
}
|
|
54822
54991
|
diesChanged() {
|
|
54823
|
-
this.
|
|
54992
|
+
this.waferMapUpdateTracker.track('dies');
|
|
54993
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54824
54994
|
}
|
|
54825
54995
|
colorScaleChanged() {
|
|
54826
|
-
this.
|
|
54996
|
+
this.waferMapUpdateTracker.track('colorScale');
|
|
54997
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54827
54998
|
}
|
|
54828
54999
|
transformChanged() {
|
|
54829
|
-
this.
|
|
55000
|
+
this.waferMapUpdateTracker.track('transform');
|
|
55001
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54830
55002
|
}
|
|
54831
55003
|
canvasWidthChanged() {
|
|
54832
|
-
this.
|
|
55004
|
+
this.waferMapUpdateTracker.track('canvasWidth');
|
|
55005
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54833
55006
|
}
|
|
54834
55007
|
canvasHeightChanged() {
|
|
54835
|
-
this.
|
|
55008
|
+
this.waferMapUpdateTracker.track('canvasHeight');
|
|
55009
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54836
55010
|
}
|
|
54837
55011
|
hoverDieChanged() {
|
|
54838
55012
|
this.$emit('die-hover', { currentDie: this.hoverDie });
|
|
54839
|
-
this.
|
|
55013
|
+
this.waferMapUpdateTracker.track('hoverDie');
|
|
55014
|
+
this.waferMapUpdateTracker.queueUpdate();
|
|
54840
55015
|
}
|
|
54841
55016
|
}
|
|
54842
55017
|
__decorate$1([
|