@ni/nimble-components 17.0.6 → 17.0.7
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 +51 -26
- package/dist/all-components-bundle.js.map +1 -1
- package/dist/all-components-bundle.min.js +115 -119
- package/dist/all-components-bundle.min.js.map +1 -1
- package/dist/esm/wafer-map/modules/rendering.d.ts +7 -2
- package/dist/esm/wafer-map/modules/rendering.js +45 -13
- package/dist/esm/wafer-map/modules/rendering.js.map +1 -1
- package/dist/esm/wafer-map/modules/zoom-handler.js +3 -3
- package/dist/esm/wafer-map/modules/zoom-handler.js.map +1 -1
- package/dist/esm/wafer-map/styles.js +1 -8
- package/dist/esm/wafer-map/styles.js.map +1 -1
- package/dist/esm/wafer-map/template.js +2 -2
- package/package.json +1 -1
|
@@ -26754,11 +26754,11 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
26754
26754
|
version="1.1"
|
|
26755
26755
|
x="0px"
|
|
26756
26756
|
y="0px"
|
|
26757
|
-
viewBox="
|
|
26757
|
+
viewBox="0 0 41 41"
|
|
26758
26758
|
>
|
|
26759
26759
|
<path
|
|
26760
26760
|
class="circle-drawing-path"
|
|
26761
|
-
d="m 21
|
|
26761
|
+
d="m 40.5 21 a 20 20 1 1 1 0 -1 a 0.5 0.5 0 0 0 0 1"
|
|
26762
26762
|
/>
|
|
26763
26763
|
</svg>
|
|
26764
26764
|
</g>
|
|
@@ -26792,13 +26792,6 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
26792
26792
|
position: absolute;
|
|
26793
26793
|
}
|
|
26794
26794
|
|
|
26795
|
-
.circle-base {
|
|
26796
|
-
width: 100%;
|
|
26797
|
-
height: 100%;
|
|
26798
|
-
position: absolute;
|
|
26799
|
-
fill: white;
|
|
26800
|
-
}
|
|
26801
|
-
|
|
26802
26795
|
.notch {
|
|
26803
26796
|
transform-origin: center center;
|
|
26804
26797
|
}
|
|
@@ -26829,7 +26822,7 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
26829
26822
|
width: 100%;
|
|
26830
26823
|
height: 100%;
|
|
26831
26824
|
position: absolute;
|
|
26832
|
-
fill:
|
|
26825
|
+
fill: white;
|
|
26833
26826
|
}
|
|
26834
26827
|
|
|
26835
26828
|
.circle-drawing-path {
|
|
@@ -29871,25 +29864,57 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
29871
29864
|
*/
|
|
29872
29865
|
class RenderingModule {
|
|
29873
29866
|
constructor(waferData, canvas) {
|
|
29874
|
-
this.waferData = waferData;
|
|
29875
29867
|
this.context = canvas.getContext('2d');
|
|
29868
|
+
this.dies = waferData.diesRenderInfo;
|
|
29869
|
+
this.dimensions = waferData.dieDimensions;
|
|
29870
|
+
this.labelFontSize = waferData.labelsFontSize;
|
|
29876
29871
|
}
|
|
29877
|
-
drawWafer() {
|
|
29878
|
-
|
|
29879
|
-
|
|
29880
|
-
for (const die of dies) {
|
|
29881
|
-
this.context.fillStyle = die.fillStyle;
|
|
29882
|
-
this.context?.fillRect(die.x, die.y, dimensions.width, dimensions.height);
|
|
29883
|
-
this.context.font = this.waferData.labelsFontSize.toString();
|
|
29884
|
-
this.context.fillStyle = '#ffffff';
|
|
29885
|
-
this.context.textAlign = 'center';
|
|
29886
|
-
const aproxTextHeight = this.context.measureText('M');
|
|
29887
|
-
this.context.fillText(die.text, die.x + dimensions.width / 2, die.y + dimensions.height / 2 + aproxTextHeight.width / 2);
|
|
29888
|
-
}
|
|
29872
|
+
drawWafer(transform) {
|
|
29873
|
+
this.renderDies(transform);
|
|
29874
|
+
this.renderText(transform);
|
|
29889
29875
|
}
|
|
29890
29876
|
clearCanvas(width, height) {
|
|
29891
29877
|
this.context.clearRect(0, 0, width, height);
|
|
29892
29878
|
}
|
|
29879
|
+
renderDies(transform) {
|
|
29880
|
+
this.dieSize = this.dimensions.width * this.dimensions.height * (transform || 1);
|
|
29881
|
+
this.dies.sort((a, b) => {
|
|
29882
|
+
if (a.fillStyle > b.fillStyle) {
|
|
29883
|
+
return 1;
|
|
29884
|
+
}
|
|
29885
|
+
if (b.fillStyle > a.fillStyle) {
|
|
29886
|
+
return -1;
|
|
29887
|
+
}
|
|
29888
|
+
return 0;
|
|
29889
|
+
});
|
|
29890
|
+
let prev;
|
|
29891
|
+
for (const die of this.dies) {
|
|
29892
|
+
if (!prev) {
|
|
29893
|
+
this.context.fillStyle = die.fillStyle;
|
|
29894
|
+
}
|
|
29895
|
+
if (prev && die.fillStyle !== prev.fillStyle && die.fillStyle) {
|
|
29896
|
+
this.context.fillStyle = die.fillStyle;
|
|
29897
|
+
}
|
|
29898
|
+
this.context.fillRect(die.x, die.y, this.dimensions.width, this.dimensions.height);
|
|
29899
|
+
prev = die;
|
|
29900
|
+
}
|
|
29901
|
+
}
|
|
29902
|
+
renderText(transform) {
|
|
29903
|
+
this.dieSize = this.dimensions.width * this.dimensions.height * (transform || 1);
|
|
29904
|
+
const fontsize = this.labelFontSize;
|
|
29905
|
+
this.context.font = `${fontsize.toString()}px sans-serif`;
|
|
29906
|
+
this.context.fillStyle = '#ffffff';
|
|
29907
|
+
this.context.textAlign = 'center';
|
|
29908
|
+
this.context.lineCap = 'butt';
|
|
29909
|
+
const aproxTextHeight = this.context.measureText('M');
|
|
29910
|
+
if (this.dieSize >= 50) {
|
|
29911
|
+
for (const die of this.dies) {
|
|
29912
|
+
this.context.fillText(die.text, die.x + this.dimensions.width / 2, die.y
|
|
29913
|
+
+ this.dimensions.height / 2
|
|
29914
|
+
+ aproxTextHeight.width / 2, this.dimensions.width - (this.dimensions.width / 100) * 20);
|
|
29915
|
+
}
|
|
29916
|
+
}
|
|
29917
|
+
}
|
|
29893
29918
|
}
|
|
29894
29919
|
|
|
29895
29920
|
var xhtml = "http://www.w3.org/1999/xhtml";
|
|
@@ -32489,7 +32514,7 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
32489
32514
|
this.zoomTransform = identity;
|
|
32490
32515
|
this.clearCanvas(canvasContext, this.canvasLength, this.canvasLength);
|
|
32491
32516
|
this.scaleCanvas(canvasContext, identity.x, identity.y, identity.k);
|
|
32492
|
-
this.renderingModule.drawWafer();
|
|
32517
|
+
this.renderingModule.drawWafer(this.zoomTransform.k);
|
|
32493
32518
|
this.zoomBehavior?.transform(select(this.canvas), identity);
|
|
32494
32519
|
}
|
|
32495
32520
|
createZoomBehavior() {
|
|
@@ -32521,14 +32546,14 @@ Instead styling against the role which is more general and likely a better appro
|
|
|
32521
32546
|
this.zoomTransform = identity;
|
|
32522
32547
|
this.clearCanvas(canvasContext, this.canvasLength, this.canvasLength);
|
|
32523
32548
|
this.scaleCanvas(canvasContext, identity.x, identity.y, identity.k);
|
|
32524
|
-
this.renderingModule.drawWafer();
|
|
32549
|
+
this.renderingModule.drawWafer(this.zoomTransform.k);
|
|
32525
32550
|
zoomBehavior.transform(select(this.canvas), identity);
|
|
32526
32551
|
}
|
|
32527
32552
|
else {
|
|
32528
32553
|
this.zoomTransform = transform;
|
|
32529
32554
|
this.clearCanvas(canvasContext, this.canvasLength * this.zoomTransform.k, this.canvasLength * this.zoomTransform.k);
|
|
32530
32555
|
this.scaleCanvas(canvasContext, transform.x, transform.y, transform.k);
|
|
32531
|
-
this.renderingModule.drawWafer();
|
|
32556
|
+
this.renderingModule.drawWafer(this.zoomTransform.k);
|
|
32532
32557
|
}
|
|
32533
32558
|
canvasContext.restore();
|
|
32534
32559
|
this.zoomContainer.setAttribute('transform', this.zoomTransform.toString());
|