gantt-lib 0.130.0 → 0.131.1

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.
@@ -701,7 +701,7 @@ function universalCascade(movedTask, newStart, newEnd, allTasks, businessDays =
701
701
  }
702
702
  }
703
703
  const parentId = currentOriginal.parentId;
704
- if (parentId) {
704
+ if (parentId && parentId !== movedTask.id) {
705
705
  const parent = taskById.get(parentId);
706
706
  if (parent && !parent.locked) {
707
707
  const siblings = childrenByParentId.get(parentId) ?? [];
@@ -991,7 +991,7 @@ function resizeTaskWithCascade(taskId, anchor, newDate, snapshot, options) {
991
991
  const originalStart = parseDateOnly(task.startDate);
992
992
  const originalEnd = parseDateOnly(task.endDate);
993
993
  let newRange;
994
- if (anchor === "end") {
994
+ if (anchor === "start") {
995
995
  newRange = { start: originalStart, end: newDate };
996
996
  } else {
997
997
  newRange = { start: newDate, end: originalEnd };