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/core/scheduling/index.js +2 -2
- package/dist/core/scheduling/index.js.map +1 -1
- package/dist/core/scheduling/index.mjs +2 -2
- package/dist/core/scheduling/index.mjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1214,6 +1214,7 @@ function universalCascade(movedTask, newStart, newEnd, allTasks, businessDays =
|
|
|
1214
1214
|
const dependents = dependentsByPredecessorId.get(currentId) ?? [];
|
|
1215
1215
|
for (const { task, dependencyIndex } of dependents) {
|
|
1216
1216
|
if (task.locked || !task.dependencies) continue;
|
|
1217
|
+
if (childShifted.has(task.id)) continue;
|
|
1217
1218
|
const dep = task.dependencies[dependencyIndex];
|
|
1218
1219
|
if (!dep) continue;
|
|
1219
1220
|
const origStart = new Date(task.startDate);
|
|
@@ -1711,7 +1712,6 @@ function recalculateProjectSchedule(snapshot, options) {
|
|
|
1711
1712
|
|
|
1712
1713
|
// src/core/scheduling/modeSwitch.ts
|
|
1713
1714
|
function reflowTasksOnModeSwitch(sourceTasks, toBusinessDays, weekendPredicate) {
|
|
1714
|
-
const fromBusinessDays = !toBusinessDays;
|
|
1715
1715
|
let tasks = sourceTasks.map((task) => ({
|
|
1716
1716
|
...task,
|
|
1717
1717
|
dependencies: task.dependencies?.map((dependency) => ({ ...dependency }))
|
|
@@ -1720,7 +1720,7 @@ function reflowTasksOnModeSwitch(sourceTasks, toBusinessDays, weekendPredicate)
|
|
|
1720
1720
|
for (const task of tasks) {
|
|
1721
1721
|
if (isTaskParent(task.id, tasks)) continue;
|
|
1722
1722
|
const start = normalizeUTCDate(/* @__PURE__ */ new Date(`${task.startDate}T00:00:00.000Z`));
|
|
1723
|
-
const duration = getTaskDuration(task.startDate, task.endDate,
|
|
1723
|
+
const duration = getTaskDuration(task.startDate, task.endDate, toBusinessDays, weekendPredicate);
|
|
1724
1724
|
const range = toBusinessDays ? buildTaskRangeFromStart(
|
|
1725
1725
|
alignToWorkingDay(start, 1, weekendPredicate),
|
|
1726
1726
|
duration,
|