Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

calculateRowHeights.js 735B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.calculateRowHeights = void 0;
  4. const calculateCellHeight_1 = require("./calculateCellHeight");
  5. /**
  6. * Produces an array of values that describe the largest value length (height) in every row.
  7. */
  8. const calculateRowHeights = (rows, config) => {
  9. return rows.map((row) => {
  10. let rowHeight = 1;
  11. row.forEach((cell, cellIndex) => {
  12. const cellHeight = calculateCellHeight_1.calculateCellHeight(cell, config.columns[cellIndex].width, config.columns[cellIndex].wrapWord);
  13. rowHeight = Math.max(rowHeight, cellHeight);
  14. });
  15. return rowHeight;
  16. });
  17. };
  18. exports.calculateRowHeights = calculateRowHeights;