const drawTasks = function()

in assets/js/996.f8506838.js [1155:1189]


const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf2, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) {
  for (const task of tasks2) {
    const taskNode = {
      descr: task.task,
      section: sectionColor,
      number: sectionColor,
      width: 150,
      padding: 20,
      maxHeight: maxTaskHeight
    };
    _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("taskNode", taskNode);
    const taskWrapper = diagram2.append("g").attr("class", "taskWrapper");
    const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf2);
    const taskHeight = node.height;
    _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("taskHeight after draw", taskHeight);
    taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`);
    maxTaskHeight = Math.max(maxTaskHeight, taskHeight);
    if (task.events) {
      const lineWrapper = diagram2.append("g").attr("class", "lineWrapper");
      let linelength = maxTaskHeight;
      masterY += 100;
      linelength = linelength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf2);
      masterY -= 100;
      lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr(
        "y2",
        masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120
      ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
    }
    masterX = masterX + 200;
    if (isWithoutSections && !(0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.g)().timeline.disableMulticolor) {
      sectionColor++;
    }
  }
  masterY = masterY - 10;
};