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