gantt-task-react-powern 0.4.86 → 0.4.88
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/dist/index.js +33 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +33 -6
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1384,7 +1384,15 @@ var drawPathAndTriangle = function drawPathAndTriangle(taskFrom, taskTo, rowHeig
|
|
|
1384
1384
|
var verticalOffset = indexCompare * (rowHeight / 2);
|
|
1385
1385
|
|
|
1386
1386
|
var minX = function minX(t) {
|
|
1387
|
-
|
|
1387
|
+
if (t.x1 && t.actualx1) {
|
|
1388
|
+
return Math.min(t.x1, t.actualx1);
|
|
1389
|
+
} else if (t.x1) {
|
|
1390
|
+
return t.x1;
|
|
1391
|
+
} else if (t.actualx1) {
|
|
1392
|
+
return t.actualx1;
|
|
1393
|
+
} else {
|
|
1394
|
+
return 0;
|
|
1395
|
+
}
|
|
1388
1396
|
};
|
|
1389
1397
|
|
|
1390
1398
|
var maxX = function maxX(t) {
|
|
@@ -1561,7 +1569,7 @@ var convertToBar = function convertToBar(task, index, dates, columnWidth, rowHei
|
|
|
1561
1569
|
};
|
|
1562
1570
|
|
|
1563
1571
|
var convertToMilestone = function convertToMilestone(task, index, dates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, milestoneBackgroundColor, milestoneBackgroundSelectedColor) {
|
|
1564
|
-
var x = task.start && task.end ? taskXCoordinate(task.
|
|
1572
|
+
var x = task.start && task.end ? taskXCoordinate(task.end, dates, columnWidth) : 0;
|
|
1565
1573
|
var y = taskYCoordinate(index, rowHeight, taskHeight);
|
|
1566
1574
|
var x1 = task.start && task.end ? x - taskHeight * 0.5 : 0;
|
|
1567
1575
|
var x2 = task.start && task.end ? x + taskHeight * 0.5 : 0;
|
|
@@ -1879,7 +1887,10 @@ function getChildren(taskList, task) {
|
|
|
1879
1887
|
|
|
1880
1888
|
if (task.type !== "project") {
|
|
1881
1889
|
tasks = taskList.filter(function (t) {
|
|
1882
|
-
return t.dependencies && t.dependencies.
|
|
1890
|
+
return t.dependencies && t.dependencies.map(function (_ref) {
|
|
1891
|
+
var id = _ref.id;
|
|
1892
|
+
return id;
|
|
1893
|
+
}).indexOf(task.id) !== -1;
|
|
1883
1894
|
});
|
|
1884
1895
|
} else {
|
|
1885
1896
|
tasks = taskList.filter(function (t) {
|
|
@@ -2175,7 +2186,10 @@ var Milestone = function Milestone(_ref) {
|
|
|
2175
2186
|
transform: transform,
|
|
2176
2187
|
className: styles$7.milestoneBackground,
|
|
2177
2188
|
onMouseDown: function onMouseDown(e) {
|
|
2178
|
-
isDateChangeable && onEventStart("move", task, e);
|
|
2189
|
+
isDateChangeable && onEventStart("move", task, e, "planned");
|
|
2190
|
+
},
|
|
2191
|
+
onDoubleClick: function onDoubleClick(e) {
|
|
2192
|
+
onEventStart("dblclick", task, e);
|
|
2179
2193
|
}
|
|
2180
2194
|
}));
|
|
2181
2195
|
};
|
|
@@ -2608,6 +2622,21 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
2608
2622
|
}, tasks.map(function (_task) {
|
|
2609
2623
|
var task = _task.start.getTime() > 0 && _task.end.getTime() > 0 || _task.actualStart.getTime() > 0 && _task.actualEnd.getTime() > 0 ? _task : undefined;
|
|
2610
2624
|
|
|
2625
|
+
if (!task && _task.typeInternal === "milestone") {
|
|
2626
|
+
return React__default.createElement(Milestone, {
|
|
2627
|
+
task: _task,
|
|
2628
|
+
arrowIndent: arrowIndent,
|
|
2629
|
+
taskHeight: taskHeight,
|
|
2630
|
+
isProgressChangeable: false,
|
|
2631
|
+
isDateChangeable: false,
|
|
2632
|
+
isDelete: !_task.isDisabled,
|
|
2633
|
+
onEventStart: handleBarEventStart,
|
|
2634
|
+
key: _task.id,
|
|
2635
|
+
isSelected: !!selectedTask && _task.id === selectedTask.id,
|
|
2636
|
+
rtl: rtl
|
|
2637
|
+
});
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2611
2640
|
if (!task) {
|
|
2612
2641
|
return React__default.createElement("g", {
|
|
2613
2642
|
key: _task.id,
|
|
@@ -2928,8 +2957,6 @@ var Gantt = function Gantt(_ref) {
|
|
|
2928
2957
|
primaryPath = _getCriticalPaths[0],
|
|
2929
2958
|
secondaryPath = _getCriticalPaths[1];
|
|
2930
2959
|
|
|
2931
|
-
console.debug(primaryPath, secondaryPath);
|
|
2932
|
-
|
|
2933
2960
|
if (leafTasks.length > 0 && primaryPath.length === 0 && secondaryPath.length === 0) {
|
|
2934
2961
|
setHasCircularDeps(true);
|
|
2935
2962
|
} else {
|