gantt-task-react-powern 0.4.96 → 0.4.98
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 +7 -48
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +7 -48
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2019,7 +2019,7 @@ var Bar = function Bar(_ref) {
|
|
|
2019
2019
|
var handleHeight = task.height / 2 - 1;
|
|
2020
2020
|
|
|
2021
2021
|
if (type == "planned") {
|
|
2022
|
-
if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2)
|
|
2022
|
+
if ((task === null || task === void 0 ? void 0 : task.x1) >= 0 && (task === null || task === void 0 ? void 0 : task.x2) >= 0 && task.x2 - task.x1 >= 0) return React.createElement("g", {
|
|
2023
2023
|
className: styles$6.barWrapper,
|
|
2024
2024
|
tabIndex: 0
|
|
2025
2025
|
}, React.createElement(BarDisplay, {
|
|
@@ -2067,7 +2067,7 @@ var Bar = function Bar(_ref) {
|
|
|
2067
2067
|
className: styles$6.barWrapper,
|
|
2068
2068
|
tabIndex: 0
|
|
2069
2069
|
});
|
|
2070
|
-
} else if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2)
|
|
2070
|
+
} else if ((task === null || task === void 0 ? void 0 : task.actualx1) >= 0 && (task === null || task === void 0 ? void 0 : task.actualx2) >= 0 && task.actualx2 - task.actualx1 >= 0) {
|
|
2071
2071
|
return React.createElement("g", {
|
|
2072
2072
|
className: styles$6.barWrapper,
|
|
2073
2073
|
tabIndex: 0
|
|
@@ -3393,7 +3393,6 @@ function getCriticalPaths(leafTasks) {
|
|
|
3393
3393
|
primaryLeaf = taskMap[primaryLeaf].next;
|
|
3394
3394
|
}
|
|
3395
3395
|
|
|
3396
|
-
console.debug(taskMap);
|
|
3397
3396
|
var secondaryLeaf;
|
|
3398
3397
|
var secondaryDuration = 0;
|
|
3399
3398
|
|
|
@@ -3420,54 +3419,14 @@ function getCriticalPaths(leafTasks) {
|
|
|
3420
3419
|
function computeCriticalPath(taskID, taskMap) {
|
|
3421
3420
|
var task = taskMap[taskID].task;
|
|
3422
3421
|
var dependents = taskMap[taskID].dependents;
|
|
3423
|
-
taskMap[taskID].start = task.start.getTime();
|
|
3424
3422
|
taskMap[taskID].end = task.end.getTime();
|
|
3425
|
-
var start = taskMap[taskID].start;
|
|
3426
3423
|
|
|
3427
|
-
for (var
|
|
3428
|
-
var
|
|
3424
|
+
for (var j = 0; j < dependents.length; j++) {
|
|
3425
|
+
var newDependentEnd = taskMap[dependents[j]].end;
|
|
3429
3426
|
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
return d.id === taskID;
|
|
3434
|
-
});
|
|
3435
|
-
console.debug(dependency);
|
|
3436
|
-
if (!dependency) continue;
|
|
3437
|
-
|
|
3438
|
-
switch (dependency.type) {
|
|
3439
|
-
case "FS":
|
|
3440
|
-
if (taskMap[depID].end > taskMap[taskID].end) {
|
|
3441
|
-
taskMap[taskID].next = depID;
|
|
3442
|
-
taskMap[taskID].end = taskMap[depID].end;
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
break;
|
|
3446
|
-
|
|
3447
|
-
case "SS":
|
|
3448
|
-
if (taskMap[depID].start > start) {
|
|
3449
|
-
taskMap[taskID].next = depID;
|
|
3450
|
-
start = taskMap[depID].start;
|
|
3451
|
-
taskMap[taskID].end = taskMap[depID].end;
|
|
3452
|
-
}
|
|
3453
|
-
|
|
3454
|
-
break;
|
|
3455
|
-
|
|
3456
|
-
case "FF":
|
|
3457
|
-
if (taskMap[depID].end > taskMap[taskID].end) {
|
|
3458
|
-
taskMap[taskID].next = depID;
|
|
3459
|
-
taskMap[taskID].end = taskMap[depID].end;
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
|
-
break;
|
|
3463
|
-
|
|
3464
|
-
case "SF":
|
|
3465
|
-
if (taskMap[depID].start > taskMap[taskID].end) {
|
|
3466
|
-
taskMap[taskID].next = depID;
|
|
3467
|
-
taskMap[taskID].end = taskMap[depID].start;
|
|
3468
|
-
}
|
|
3469
|
-
|
|
3470
|
-
break;
|
|
3427
|
+
if (newDependentEnd > taskMap[taskID].end) {
|
|
3428
|
+
taskMap[taskID].next = dependents[j];
|
|
3429
|
+
taskMap[taskID].end = newDependentEnd;
|
|
3471
3430
|
}
|
|
3472
3431
|
}
|
|
3473
3432
|
}
|