gantt-task-react-powern 0.4.3 → 0.4.5

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.
@@ -119,10 +119,6 @@ var ganttDateRange = function ganttDateRange(tasks, viewMode, preStepsCount) {
119
119
  }
120
120
  }
121
121
 
122
- newStartDate = addToDate(newStartDate, -1, "year");
123
- newEndDate = addToDate(newEndDate, 1, "year");
124
- console.log(newStartDate, newEndDate);
125
-
126
122
  switch (viewMode) {
127
123
  case ViewMode.Year:
128
124
  newStartDate = addToDate(newStartDate, -1, "year");
@@ -174,7 +170,6 @@ var ganttDateRange = function ganttDateRange(tasks, viewMode, preStepsCount) {
174
170
  break;
175
171
  }
176
172
 
177
- console.log(newStartDate, newEndDate);
178
173
  return [newStartDate, newEndDate];
179
174
  };
180
175
  var seedDates = function seedDates(startDate, endDate, viewMode) {
@@ -1064,7 +1059,8 @@ var Arrow = function Arrow(_ref) {
1064
1059
  rowHeight = _ref.rowHeight,
1065
1060
  taskHeight = _ref.taskHeight,
1066
1061
  arrowIndent = _ref.arrowIndent,
1067
- rtl = _ref.rtl;
1062
+ rtl = _ref.rtl,
1063
+ arrowColor = _ref.arrowColor;
1068
1064
  var path;
1069
1065
  var trianglePoints;
1070
1066
 
@@ -1085,9 +1081,11 @@ var Arrow = function Arrow(_ref) {
1085
1081
  }, React.createElement("path", {
1086
1082
  strokeWidth: "1.5",
1087
1083
  d: path,
1088
- fill: "none"
1084
+ fill: "none",
1085
+ stroke: arrowColor
1089
1086
  }), React.createElement("polygon", {
1090
- points: trianglePoints
1087
+ points: trianglePoints,
1088
+ fill: arrowColor
1091
1089
  }));
1092
1090
  };
1093
1091
 
@@ -1258,7 +1256,6 @@ var convertToMilestone = function convertToMilestone(task, index, dates, columnW
1258
1256
  };
1259
1257
 
1260
1258
  var taskXCoordinate = function taskXCoordinate(xDate, dates, columnWidth) {
1261
- console.log(xDate);
1262
1259
  console.log(dates);
1263
1260
  var index = dates.findIndex(function (d) {
1264
1261
  return d.getTime() >= xDate.getTime();
@@ -1563,8 +1560,6 @@ var sortTasks = function sortTasks(taskA, taskB) {
1563
1560
  }
1564
1561
  };
1565
1562
 
1566
- var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1567
-
1568
1563
  var BarDisplay = function BarDisplay(_ref) {
1569
1564
  var x = _ref.x,
1570
1565
  y = _ref.y,
@@ -1597,7 +1592,8 @@ var BarDisplay = function BarDisplay(_ref) {
1597
1592
  ry: barCornerRadius,
1598
1593
  rx: barCornerRadius,
1599
1594
  fill: getBarColor(),
1600
- className: styles$6.barBackground
1595
+ strokeWidth: 2,
1596
+ stroke: styles.criticalPathColor
1601
1597
  }), React.createElement("rect", {
1602
1598
  x: actualX1,
1603
1599
  width: actualX2 - actualX1,
@@ -1617,6 +1613,8 @@ var BarDisplay = function BarDisplay(_ref) {
1617
1613
  }));
1618
1614
  };
1619
1615
 
1616
+ var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1617
+
1620
1618
  var BarDateHandle = function BarDateHandle(_ref) {
1621
1619
  var x = _ref.x,
1622
1620
  y = _ref.y,
@@ -1890,7 +1888,6 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
1890
1888
  timeStep = _ref.timeStep,
1891
1889
  svg = _ref.svg,
1892
1890
  taskHeight = _ref.taskHeight,
1893
- arrowColor = _ref.arrowColor,
1894
1891
  arrowIndent = _ref.arrowIndent,
1895
1892
  fontFamily = _ref.fontFamily,
1896
1893
  fontSize = _ref.fontSize,
@@ -2108,9 +2105,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2108
2105
  return React.createElement("g", {
2109
2106
  className: "content"
2110
2107
  }, React.createElement("g", {
2111
- className: "arrows",
2112
- fill: arrowColor,
2113
- stroke: arrowColor
2108
+ className: "arrows"
2114
2109
  }, tasks.map(function (task) {
2115
2110
  return task.barChildren.map(function (child) {
2116
2111
  return React.createElement(Arrow, {
@@ -2120,7 +2115,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2120
2115
  rowHeight: rowHeight,
2121
2116
  taskHeight: taskHeight,
2122
2117
  arrowIndent: arrowIndent,
2123
- rtl: rtl
2118
+ rtl: rtl,
2119
+ arrowColor: task.styles.criticalPathColor || "#808080"
2124
2120
  });
2125
2121
  });
2126
2122
  })), React.createElement("g", {