gantt-task-react-powern 0.6.0 → 0.6.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.
- package/dist/index.js +28 -18
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +28 -18
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3513,6 +3513,14 @@ function getCriticalPaths(leafTasks) {
|
|
|
3513
3513
|
}
|
|
3514
3514
|
}
|
|
3515
3515
|
|
|
3516
|
+
var printedList = taskChainList.map(function (elem) {
|
|
3517
|
+
var newElem = _extends({}, elem);
|
|
3518
|
+
|
|
3519
|
+
newElem.duration = Math.round(elem.duration / 86400000);
|
|
3520
|
+
return newElem;
|
|
3521
|
+
});
|
|
3522
|
+
console.debug(printedList);
|
|
3523
|
+
|
|
3516
3524
|
if (taskChainList.length > 0) {
|
|
3517
3525
|
taskChainList.sort(function (a, b) {
|
|
3518
3526
|
return b.duration - a.duration;
|
|
@@ -3624,25 +3632,27 @@ function computeCriticalPath(taskID, taskMap) {
|
|
|
3624
3632
|
}
|
|
3625
3633
|
}
|
|
3626
3634
|
|
|
3627
|
-
|
|
3635
|
+
if (paths.length === 0) {
|
|
3636
|
+
var immediateChildDuration = taskMap[taskID].end - taskMap[taskID].start + depDuration - overlap;
|
|
3628
3637
|
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3638
|
+
if (taskMap[taskID].paths.length < 2) {
|
|
3639
|
+
taskMap[taskID].paths.push({
|
|
3640
|
+
duration: immediateChildDuration,
|
|
3641
|
+
task: dependents[j],
|
|
3642
|
+
parent: taskID,
|
|
3643
|
+
visited: false
|
|
3644
|
+
});
|
|
3645
|
+
} else if (immediateChildDuration > taskMap[taskID].paths[0].duration) {
|
|
3646
|
+
taskMap[taskID].paths[0].duration = immediateChildDuration;
|
|
3647
|
+
taskMap[taskID].paths[0].task = dependents[j];
|
|
3648
|
+
taskMap[taskID].paths[0].parent = taskID;
|
|
3649
|
+
taskMap[taskID].paths[0].visited = false;
|
|
3650
|
+
} else if (immediateChildDuration > taskMap[taskID].paths[1].duration) {
|
|
3651
|
+
taskMap[taskID].paths[1].duration = immediateChildDuration;
|
|
3652
|
+
taskMap[taskID].paths[1].task = dependents[j];
|
|
3653
|
+
taskMap[taskID].paths[1].parent = taskID;
|
|
3654
|
+
taskMap[taskID].paths[1].visited = false;
|
|
3655
|
+
}
|
|
3646
3656
|
}
|
|
3647
3657
|
}
|
|
3648
3658
|
}
|