Source: src/stretch-cell.js


/**
 * StretchCell Class.
 */
class StretchCell {
  constructor(inner, width, height) {
    this.inner = inner;
    this.width = width;
    this.height = height;
  }

   /**
   * Function to draw a stretch cell.
   * @param {number} input width of the cell.
   * @param {number} input height of the cell.
   */
  draw(width, height) {
    return this.inner.draw(width, height);
  };

  /**
   * Get the min width of a cell.
   * @param {number} input width of the cell.
   * @param {number} input height of the cell.
   * @return {number} maximum between the given width and the width of the inner cell
   */
  minWidth() {
    return Math.max(this.width, this.inner.minWidth());
  }

   /**
   * Get the min height cell.
   *
   * @param {number} input width of the cell.
   * @param {number} input height of the cell.
   * @return {number} maximum between the given height and the height of the inner cell
   */
  minHeight() {
    return Math.max(this.height, this.inner.minHeight());
  };
}

module.exports = StretchCell