@ni/nimble-components 20.6.0 → 20.6.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.
@@ -16288,7 +16288,7 @@
16288
16288
 
16289
16289
  /**
16290
16290
  * Do not edit directly
16291
- * Generated on Thu, 28 Sep 2023 22:01:04 GMT
16291
+ * Generated on Tue, 03 Oct 2023 14:12:03 GMT
16292
16292
  */
16293
16293
 
16294
16294
  const Information100DarkUi = "#a46eff";
@@ -65951,18 +65951,19 @@ img.ProseMirror-separator {
65951
65951
  }
65952
65952
  }
65953
65953
  resetGridSizedColumns() {
65954
- if (!this.gridSizedColumns) {
65954
+ if (!this.gridSizedColumns || this.gridSizedColumns.length === 0) {
65955
65955
  return;
65956
65956
  }
65957
+ const gridSizeColumnTotal = this.gridSizedColumns.reduce((sum, col) => sum + col.columnInternals.currentPixelWidth, 0);
65958
+ const gridSizeColumnAverage = gridSizeColumnTotal / this.gridSizedColumns.length;
65957
65959
  let gridColumnIndex = 0;
65958
65960
  for (let i = 0; i < this.visibleColumns.length
65959
65961
  && gridColumnIndex < this.gridSizedColumns.length; i++) {
65960
65962
  const column = this.visibleColumns[i];
65961
65963
  if (column === this.gridSizedColumns[gridColumnIndex]) {
65962
65964
  gridColumnIndex += 1;
65963
- column.columnInternals.currentFractionalWidth = (column.columnInternals.currentPixelWidth
65964
- / this.initialColumnWidths[i].initialPixelWidth)
65965
- * this.initialColumnWidths[i].initalColumnFractionalWidth;
65965
+ column.columnInternals.currentFractionalWidth = column.columnInternals.currentPixelWidth
65966
+ / gridSizeColumnAverage;
65966
65967
  column.columnInternals.currentPixelWidth = undefined;
65967
65968
  }
65968
65969
  }