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