@ni/nimble-components 16.1.7 → 16.1.8

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.
@@ -28106,19 +28106,24 @@ Instead styling against the role which is more general and likely a better appro
28106
28106
  };
28107
28107
  }
28108
28108
  calculateMapDimensions(dies) {
28109
- if (dies.length === 0 || dies[0] === undefined)
28109
+ if (dies.length === 0 || dies[0] === undefined) {
28110
28110
  return { origin: { x: 0, y: 0 }, rows: 0, cols: 0 };
28111
+ }
28111
28112
  const minPoint = { x: dies[0].x, y: dies[0].y };
28112
28113
  const maxPoint = { x: dies[0].x, y: dies[0].y };
28113
28114
  for (const die of dies) {
28114
- if (die.x < minPoint.x)
28115
+ if (die.x < minPoint.x) {
28115
28116
  minPoint.x = die.x;
28116
- if (die.y < minPoint.y)
28117
+ }
28118
+ if (die.y < minPoint.y) {
28117
28119
  minPoint.y = die.y;
28118
- if (die.x > maxPoint.x)
28120
+ }
28121
+ if (die.x > maxPoint.x) {
28119
28122
  maxPoint.x = die.x;
28120
- if (die.y > maxPoint.y)
28123
+ }
28124
+ if (die.y > maxPoint.y) {
28121
28125
  maxPoint.y = die.y;
28126
+ }
28122
28127
  }
28123
28128
  return {
28124
28129
  origin: minPoint,
@@ -29454,8 +29459,9 @@ Instead styling against the role which is more general and likely a better appro
29454
29459
  super.connectedCallback();
29455
29460
  this.resizeObserver = new ResizeObserver(entries => {
29456
29461
  const entry = entries[0];
29457
- if (entry === undefined)
29462
+ if (entry === undefined) {
29458
29463
  return;
29464
+ }
29459
29465
  const { height, width } = entry.contentRect;
29460
29466
  this.canvasSideLength = Math.min(height, width);
29461
29467
  });
@@ -29471,8 +29477,10 @@ Instead styling against the role which is more general and likely a better appro
29471
29477
  */
29472
29478
  render() {
29473
29479
  this.renderQueued = false;
29474
- if (this.canvasSideLength === undefined || this.canvasSideLength === 0)
29480
+ if (this.canvasSideLength === undefined
29481
+ || this.canvasSideLength === 0) {
29475
29482
  return;
29483
+ }
29476
29484
  this.renderer?.clearCanvas(this.canvasSideLength, this.canvasSideLength);
29477
29485
  this.dataManager = new DataManager(this.dies, this.quadrant, { width: this.canvasSideLength, height: this.canvasSideLength }, this.colorScale, this.highlightedValues, this.colorScaleMode, this.dieLabelsHidden, this.dieLabelsSuffix, this.maxCharacters);
29478
29486
  this.renderer = new RenderingModule(this.dataManager, this.canvas);