gantt-task-react-powern 0.4.4 → 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");
@@ -1063,7 +1059,8 @@ var Arrow = function Arrow(_ref) {
1063
1059
  rowHeight = _ref.rowHeight,
1064
1060
  taskHeight = _ref.taskHeight,
1065
1061
  arrowIndent = _ref.arrowIndent,
1066
- rtl = _ref.rtl;
1062
+ rtl = _ref.rtl,
1063
+ arrowColor = _ref.arrowColor;
1067
1064
  var path;
1068
1065
  var trianglePoints;
1069
1066
 
@@ -1084,9 +1081,11 @@ var Arrow = function Arrow(_ref) {
1084
1081
  }, React.createElement("path", {
1085
1082
  strokeWidth: "1.5",
1086
1083
  d: path,
1087
- fill: "none"
1084
+ fill: "none",
1085
+ stroke: arrowColor
1088
1086
  }), React.createElement("polygon", {
1089
- points: trianglePoints
1087
+ points: trianglePoints,
1088
+ fill: arrowColor
1090
1089
  }));
1091
1090
  };
1092
1091
 
@@ -1257,9 +1256,11 @@ var convertToMilestone = function convertToMilestone(task, index, dates, columnW
1257
1256
  };
1258
1257
 
1259
1258
  var taskXCoordinate = function taskXCoordinate(xDate, dates, columnWidth) {
1259
+ console.log(dates);
1260
1260
  var index = dates.findIndex(function (d) {
1261
1261
  return d.getTime() >= xDate.getTime();
1262
1262
  }) - 1;
1263
+ console.log(index);
1263
1264
  var remainderMillis = xDate.getTime() - dates[index].getTime();
1264
1265
  var percentOfInterval = remainderMillis / (dates[index + 1].getTime() - dates[index].getTime());
1265
1266
  var x = index * columnWidth + percentOfInterval * columnWidth;
@@ -1559,8 +1560,6 @@ var sortTasks = function sortTasks(taskA, taskB) {
1559
1560
  }
1560
1561
  };
1561
1562
 
1562
- var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1563
-
1564
1563
  var BarDisplay = function BarDisplay(_ref) {
1565
1564
  var x = _ref.x,
1566
1565
  y = _ref.y,
@@ -1593,7 +1592,8 @@ var BarDisplay = function BarDisplay(_ref) {
1593
1592
  ry: barCornerRadius,
1594
1593
  rx: barCornerRadius,
1595
1594
  fill: getBarColor(),
1596
- className: styles$6.barBackground
1595
+ strokeWidth: 2,
1596
+ stroke: styles.criticalPathColor
1597
1597
  }), React.createElement("rect", {
1598
1598
  x: actualX1,
1599
1599
  width: actualX2 - actualX1,
@@ -1613,6 +1613,8 @@ var BarDisplay = function BarDisplay(_ref) {
1613
1613
  }));
1614
1614
  };
1615
1615
 
1616
+ var styles$6 = {"barWrapper":"_KxSXS","barHandle":"_3w_5u","barBackground":"_31ERP"};
1617
+
1616
1618
  var BarDateHandle = function BarDateHandle(_ref) {
1617
1619
  var x = _ref.x,
1618
1620
  y = _ref.y,
@@ -1886,7 +1888,6 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
1886
1888
  timeStep = _ref.timeStep,
1887
1889
  svg = _ref.svg,
1888
1890
  taskHeight = _ref.taskHeight,
1889
- arrowColor = _ref.arrowColor,
1890
1891
  arrowIndent = _ref.arrowIndent,
1891
1892
  fontFamily = _ref.fontFamily,
1892
1893
  fontSize = _ref.fontSize,
@@ -2104,9 +2105,7 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2104
2105
  return React.createElement("g", {
2105
2106
  className: "content"
2106
2107
  }, React.createElement("g", {
2107
- className: "arrows",
2108
- fill: arrowColor,
2109
- stroke: arrowColor
2108
+ className: "arrows"
2110
2109
  }, tasks.map(function (task) {
2111
2110
  return task.barChildren.map(function (child) {
2112
2111
  return React.createElement(Arrow, {
@@ -2116,7 +2115,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
2116
2115
  rowHeight: rowHeight,
2117
2116
  taskHeight: taskHeight,
2118
2117
  arrowIndent: arrowIndent,
2119
- rtl: rtl
2118
+ rtl: rtl,
2119
+ arrowColor: task.styles.criticalPathColor || "#808080"
2120
2120
  });
2121
2121
  });
2122
2122
  })), React.createElement("g", {