gantt-task-react-powern 0.4.22 → 0.4.24
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 +10 -17
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +10 -17
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2795,27 +2795,20 @@ var Gantt = function Gantt(_ref) {
|
|
|
2795
2795
|
}
|
|
2796
2796
|
|
|
2797
2797
|
function colorPath(path, color, tasks) {
|
|
2798
|
-
var
|
|
2799
|
-
var
|
|
2800
|
-
|
|
2801
|
-
|
|
2798
|
+
for (var i = 0; i < path.length; i++) {
|
|
2799
|
+
for (var j = 0; j < tasks.length; j++) {
|
|
2800
|
+
if (path[i].id.startsWith(tasks[j].id + ".") || path[i].id === tasks[j].id) {
|
|
2801
|
+
var _tasks$j$styles;
|
|
2802
2802
|
|
|
2803
|
-
|
|
2804
|
-
if (!task.styles) task.styles = {};
|
|
2805
|
-
task.styles.criticalPathColor = color;
|
|
2806
|
-
task = tasks.find(function (otherTask) {
|
|
2807
|
-
var _task;
|
|
2803
|
+
var _styles = (_tasks$j$styles = tasks[j].styles) != null ? _tasks$j$styles : {};
|
|
2808
2804
|
|
|
2809
|
-
|
|
2810
|
-
|
|
2805
|
+
_styles.criticalPathColor = color;
|
|
2806
|
+
tasks[j].styles = _styles;
|
|
2807
|
+
}
|
|
2811
2808
|
}
|
|
2812
|
-
};
|
|
2813
|
-
|
|
2814
|
-
for (var i = 0; i < path.length; i++) {
|
|
2815
|
-
_loop(i);
|
|
2816
2809
|
}
|
|
2817
2810
|
|
|
2818
|
-
var
|
|
2811
|
+
var _loop = function _loop(_i) {
|
|
2819
2812
|
var arrows = path[_i].criticalPathArrows;
|
|
2820
2813
|
if (!arrows) arrows = [];
|
|
2821
2814
|
var arrow = arrows.find(function (arrow) {
|
|
@@ -2829,7 +2822,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
2829
2822
|
};
|
|
2830
2823
|
|
|
2831
2824
|
for (var _i = 0; _i + 1 < path.length; _i++) {
|
|
2832
|
-
|
|
2825
|
+
_loop(_i);
|
|
2833
2826
|
}
|
|
2834
2827
|
}
|
|
2835
2828
|
|