gantt-task-react-powern 0.4.29 → 0.4.30

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.
@@ -1877,8 +1877,7 @@ var Project = function Project(_ref) {
1877
1877
  height: task.height,
1878
1878
  rx: task.barCornerRadius,
1879
1879
  ry: task.barCornerRadius,
1880
- className: styles$8.projectBackground,
1881
- stroke: task.styles.criticalPathColor
1880
+ className: styles$8.projectBackground
1882
1881
  }), React.createElement("rect", {
1883
1882
  x: task.progressX,
1884
1883
  width: task.progressWidth,
@@ -1886,8 +1885,7 @@ var Project = function Project(_ref) {
1886
1885
  height: task.height,
1887
1886
  ry: task.barCornerRadius,
1888
1887
  rx: task.barCornerRadius,
1889
- fill: processColor,
1890
- stroke: task.styles.criticalPathColor
1888
+ fill: processColor
1891
1889
  }), React.createElement("rect", {
1892
1890
  fill: barColor,
1893
1891
  x: task.x1,
@@ -1896,18 +1894,15 @@ var Project = function Project(_ref) {
1896
1894
  height: task.height / 2,
1897
1895
  rx: task.barCornerRadius,
1898
1896
  ry: task.barCornerRadius,
1899
- className: styles$8.projectTop,
1900
- stroke: task.styles.criticalPathColor
1897
+ className: styles$8.projectTop
1901
1898
  }), React.createElement("polygon", {
1902
1899
  className: styles$8.projectTop,
1903
1900
  points: projectLeftTriangle,
1904
- fill: barColor,
1905
- stroke: task.styles.criticalPathColor
1901
+ fill: barColor
1906
1902
  }), React.createElement("polygon", {
1907
1903
  className: styles$8.projectTop,
1908
1904
  points: projectRightTriangle,
1909
- fill: barColor,
1910
- stroke: task.styles.criticalPathColor
1905
+ fill: barColor
1911
1906
  }));
1912
1907
  };
1913
1908
 
@@ -2813,7 +2808,7 @@ var Gantt = function Gantt(_ref) {
2813
2808
 
2814
2809
  var primaryPath = [];
2815
2810
 
2816
- while (primaryLeaf) {
2811
+ while (primaryLeaf !== undefined) {
2817
2812
  taskMap[primaryLeaf].excluded = true;
2818
2813
  primaryPath.push(taskMap[primaryLeaf].task);
2819
2814
  primaryLeaf = taskMap[primaryLeaf].next;
@@ -2835,7 +2830,7 @@ var Gantt = function Gantt(_ref) {
2835
2830
 
2836
2831
  var secondaryPath = [];
2837
2832
 
2838
- while (secondaryLeaf) {
2833
+ while (secondaryLeaf !== undefined) {
2839
2834
  secondaryPath.push(taskMap[secondaryLeaf].task);
2840
2835
  secondaryLeaf = taskMap[secondaryLeaf].next;
2841
2836
  }
@@ -2894,16 +2889,27 @@ var Gantt = function Gantt(_ref) {
2894
2889
  }
2895
2890
 
2896
2891
  var _loop = function _loop(_i7) {
2897
- var arrows = path[_i7].criticalPathArrows;
2898
- if (!arrows) arrows = [];
2899
- var arrow = arrows.find(function (arrow) {
2900
- return arrow.taskId === path[_i7 + 1].id;
2901
- });
2902
- if (arrow) arrow.arrowColor = color;else arrows.push({
2903
- taskId: path[_i7 + 1].id,
2904
- arrowColor: color
2905
- });
2906
- path[_i7].criticalPathArrows = arrows;
2892
+ var taskFromTasks = void 0;
2893
+
2894
+ for (var _j = 0; _j < tasks.length; _j++) {
2895
+ if (path[_i7].id === tasks[_j].id) {
2896
+ taskFromTasks = tasks[_j];
2897
+ break;
2898
+ }
2899
+ }
2900
+
2901
+ if (taskFromTasks) {
2902
+ var arrows = taskFromTasks.criticalPathArrows;
2903
+ if (!arrows) arrows = [];
2904
+ var arrow = arrows.find(function (arrow) {
2905
+ return arrow.taskId === path[_i7 + 1].id;
2906
+ });
2907
+ if (arrow) arrow.arrowColor = color;else arrows.push({
2908
+ taskId: path[_i7 + 1].id,
2909
+ arrowColor: color
2910
+ });
2911
+ taskFromTasks.criticalPathArrows = arrows;
2912
+ }
2907
2913
  };
2908
2914
 
2909
2915
  for (var _i7 = 0; _i7 + 1 < path.length; _i7++) {