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