gantt-task-react-powern 0.4.29 → 0.4.31
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 +1 -1
- package/dist/index.js +28 -23
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +28 -23
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -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,12 +2830,11 @@ 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
|
}
|
|
2842
2837
|
|
|
2843
|
-
console.log(primaryPath, secondaryPath);
|
|
2844
2838
|
return [primaryPath, secondaryPath];
|
|
2845
2839
|
}
|
|
2846
2840
|
|
|
@@ -2894,16 +2888,27 @@ var Gantt = function Gantt(_ref) {
|
|
|
2894
2888
|
}
|
|
2895
2889
|
|
|
2896
2890
|
var _loop = function _loop(_i7) {
|
|
2897
|
-
var
|
|
2898
|
-
|
|
2899
|
-
var
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2891
|
+
var taskFromTasks = void 0;
|
|
2892
|
+
|
|
2893
|
+
for (var _j = 0; _j < tasks.length; _j++) {
|
|
2894
|
+
if (path[_i7].id === tasks[_j].id) {
|
|
2895
|
+
taskFromTasks = tasks[_j];
|
|
2896
|
+
break;
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
if (taskFromTasks) {
|
|
2901
|
+
var arrows = taskFromTasks.criticalPathArrows;
|
|
2902
|
+
if (!arrows) arrows = [];
|
|
2903
|
+
var arrow = arrows.find(function (arrow) {
|
|
2904
|
+
return arrow.taskId === path[_i7 + 1].id;
|
|
2905
|
+
});
|
|
2906
|
+
if (arrow) arrow.arrowColor = color;else arrows.push({
|
|
2907
|
+
taskId: path[_i7 + 1].id,
|
|
2908
|
+
arrowColor: color
|
|
2909
|
+
});
|
|
2910
|
+
taskFromTasks.criticalPathArrows = arrows;
|
|
2911
|
+
}
|
|
2907
2912
|
};
|
|
2908
2913
|
|
|
2909
2914
|
for (var _i7 = 0; _i7 + 1 < path.length; _i7++) {
|