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