gantt-lib 0.128.0 → 0.128.2

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.
package/dist/index.mjs CHANGED
@@ -1068,6 +1068,7 @@ function universalCascade(movedTask, newStart, newEnd, allTasks, businessDays =
1068
1068
  const dependents = dependentsByPredecessorId.get(currentId) ?? [];
1069
1069
  for (const { task, dependencyIndex } of dependents) {
1070
1070
  if (task.locked || !task.dependencies) continue;
1071
+ if (childShifted.has(task.id)) continue;
1071
1072
  const dep = task.dependencies[dependencyIndex];
1072
1073
  if (!dep) continue;
1073
1074
  const origStart = new Date(task.startDate);
@@ -1565,7 +1566,6 @@ function recalculateProjectSchedule(snapshot, options) {
1565
1566
 
1566
1567
  // src/core/scheduling/modeSwitch.ts
1567
1568
  function reflowTasksOnModeSwitch(sourceTasks, toBusinessDays, weekendPredicate) {
1568
- const fromBusinessDays = !toBusinessDays;
1569
1569
  let tasks = sourceTasks.map((task) => ({
1570
1570
  ...task,
1571
1571
  dependencies: task.dependencies?.map((dependency) => ({ ...dependency }))
@@ -1574,7 +1574,7 @@ function reflowTasksOnModeSwitch(sourceTasks, toBusinessDays, weekendPredicate)
1574
1574
  for (const task of tasks) {
1575
1575
  if (isTaskParent(task.id, tasks)) continue;
1576
1576
  const start = normalizeUTCDate(/* @__PURE__ */ new Date(`${task.startDate}T00:00:00.000Z`));
1577
- const duration = getTaskDuration(task.startDate, task.endDate, fromBusinessDays, weekendPredicate);
1577
+ const duration = getTaskDuration(task.startDate, task.endDate, toBusinessDays, weekendPredicate);
1578
1578
  const range = toBusinessDays ? buildTaskRangeFromStart(
1579
1579
  alignToWorkingDay(start, 1, weekendPredicate),
1580
1580
  duration,