addGraphicToSubRowIfFits(activity, subRow) {
    // Adding a graphic to an empty subrow must always succeed.
    if (!subRow.length) {
      subRow.push(activity);
    }
    // Otherwise, check whether the graphic fits at the end of the subRow.
    else {
      const lastRowTask = subRow[subRow.length - 1];
      if (this.compareBoundingBoxes) {
        if (activity.left < lastRowTask.left + lastRowTask.width) {
          return false;
        }
      } else if (activity.start < lastRowTask.end) {
        return false;
      }
      subRow.push(activity);
    }
    return true;
  }
/**
   * Adds the specified task to the specified subRow if it fits. If the
   * task is successfully added to the list of graphics for the subrow, this method
   * returns true. If the graphic does not fit into the subrow, this method returns
   * false. If the graphic does not fit into any of the existing subrows, the tiling
   * policy will create a new subrow for the graphic. Note, that a graphic must always
   * succeed in being added to an empty subrow.
   *
   * @param activity             The activity to add.
   * @param subRow               The subRow, represented as a list of activities.
   */
Adds the specified task to the specified subRow if it fits. If the
task is successfully added to the list of graphics for the subrow, this method
returns true. If the graphic does not fit into the subrow, this method returns
false. If the graphic does not fit into any of the existing subrows, the tiling
policy will create a new subrow for the graphic. Note, that a graphic must always
succeed in being added to an empty subrow.

@param activity             The activity to add.
@param subRow               The subRow, represented as a list of activities.
Adds the specified task to the specified subRow if it fits . If the task is successfully added to the list of graphics for the subrow this method returns true . If the graphic does not fit into the subrow this method returns false . If the graphic does not fit into any of the existing subrows the tiling policy will create a new subrow for the graphic . Note that a graphic must always succeed in being added to an empty subrow . @param activity The activity to add . @param subRow The subRow represented as a list of activities .
addGraphicToSubRowIfFits(activity, subRow) {
    if (!subRow.length) {
      subRow.push(activity);
    }
    else {
      const lastRowTask = subRow[subRow.length - 1];
      if (this.compareBoundingBoxes) {
        if (activity.left < lastRowTask.left + lastRowTask.width) {
          return false;
        }
      } else if (activity.start < lastRowTask.end) {
        return false;
      }
      subRow.push(activity);
    }
    return true;
  }
addGraphicToSubRowIfFits ( activity , subRow ) { if ( ! subRow . length ) { subRow . push ( activity ) ; } else { const lastRowTask = subRow [ subRow . length - 1 ] ; if ( this . compareBoundingBoxes ) { if ( activity . left < lastRowTask . left + lastRowTask . width ) { return false ; } } else if ( activity . start < lastRowTask . end ) { return false ; } subRow . push ( activity ) ; } return true ; }
Adds the specified task to the specified subRow if it fits.
Adds the specified task to the specified subRow if it fits .
// Adding a graphic to an empty subrow must always succeed. // Otherwise, check whether the graphic fits at the end of the subRow.