gantt-task-react-powern 0.6.23 → 0.6.24
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.
|
@@ -27,5 +27,6 @@ export declare type TaskGanttContentProps = {
|
|
|
27
27
|
setFailedTask: (value: BarTask | null) => void;
|
|
28
28
|
setSelectedTask: (taskId: string) => void;
|
|
29
29
|
onBarTasksUpdate?: (task: BarTask) => void;
|
|
30
|
+
sliderTime?: number;
|
|
30
31
|
} & EventOption;
|
|
31
32
|
export declare const TaskGanttContent: React.FC<TaskGanttContentProps>;
|
package/dist/index.js
CHANGED
|
@@ -3076,7 +3076,8 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
3076
3076
|
onCalendarError = _ref.onCalendarError,
|
|
3077
3077
|
projectCalendar = _ref.projectCalendar,
|
|
3078
3078
|
visibleStartY = _ref.visibleStartY,
|
|
3079
|
-
visibleEndY = _ref.visibleEndY
|
|
3079
|
+
visibleEndY = _ref.visibleEndY,
|
|
3080
|
+
sliderTime = _ref.sliderTime;
|
|
3080
3081
|
var point = svg === null || svg === void 0 ? void 0 : (_svg$current = svg.current) === null || _svg$current === void 0 ? void 0 : _svg$current.createSVGPoint();
|
|
3081
3082
|
|
|
3082
3083
|
var _useState = React.useState(0),
|
|
@@ -3533,9 +3534,32 @@ var TaskGanttContent = function TaskGanttContent(_ref) {
|
|
|
3533
3534
|
});
|
|
3534
3535
|
};
|
|
3535
3536
|
|
|
3537
|
+
var lineX = sliderTime !== undefined ? taskXCoordinate(new Date(sliderTime), dates, columnWidth) : null;
|
|
3538
|
+
var totalHeight = tasks.length * rowHeight;
|
|
3539
|
+
React.useEffect(function () {
|
|
3540
|
+
if (sliderTime !== undefined) {
|
|
3541
|
+
console.log('Vertical line debug:', {
|
|
3542
|
+
sliderTime: new Date(sliderTime).toLocaleString(),
|
|
3543
|
+
lineX: lineX,
|
|
3544
|
+
totalHeight: totalHeight,
|
|
3545
|
+
tasksCount: tasks.length,
|
|
3546
|
+
columnWidth: columnWidth,
|
|
3547
|
+
datesRange: dates.length > 0 ? dates[0].toLocaleString() + " - " + dates[dates.length - 1].toLocaleString() : 'empty'
|
|
3548
|
+
});
|
|
3549
|
+
}
|
|
3550
|
+
}, [sliderTime, lineX, totalHeight, tasks.length, dates, columnWidth]);
|
|
3536
3551
|
return React__default.createElement("g", {
|
|
3537
3552
|
className: "content"
|
|
3538
|
-
}, React__default.createElement("
|
|
3553
|
+
}, lineX !== null && lineX > 0 && React__default.createElement("line", {
|
|
3554
|
+
x1: lineX,
|
|
3555
|
+
y1: 0,
|
|
3556
|
+
x2: lineX,
|
|
3557
|
+
y2: totalHeight,
|
|
3558
|
+
stroke: "red",
|
|
3559
|
+
strokeWidth: 2,
|
|
3560
|
+
pointerEvents: "none",
|
|
3561
|
+
opacity: 0.8
|
|
3562
|
+
}), React__default.createElement("g", {
|
|
3539
3563
|
className: "arrows"
|
|
3540
3564
|
}, getArrows(false), getArrows(true, "secondary"), getArrows(true, "primary")), React__default.createElement("g", {
|
|
3541
3565
|
className: "bar",
|
|
@@ -3791,7 +3815,8 @@ var Gantt = function Gantt(_ref) {
|
|
|
3791
3815
|
_ref$shouldNotShowLoa = _ref.shouldNotShowLoadingOverlay,
|
|
3792
3816
|
shouldNotShowLoadingOverlay = _ref$shouldNotShowLoa === void 0 ? true : _ref$shouldNotShowLoa,
|
|
3793
3817
|
projectCalendar = _ref.projectCalendar,
|
|
3794
|
-
onCalendarError = _ref.onCalendarError
|
|
3818
|
+
onCalendarError = _ref.onCalendarError,
|
|
3819
|
+
sliderTime = _ref.sliderTime;
|
|
3795
3820
|
var effectiveCalendar = (_tasks$find$calender = (_tasks$find = tasks.find(function (t) {
|
|
3796
3821
|
return t.calender;
|
|
3797
3822
|
})) === null || _tasks$find === void 0 ? void 0 : _tasks$find.calender) != null ? _tasks$find$calender : projectCalendar;
|
|
@@ -4329,7 +4354,8 @@ var Gantt = function Gantt(_ref) {
|
|
|
4329
4354
|
onCalendarError: onCalendarError,
|
|
4330
4355
|
projectCalendar: effectiveCalendar,
|
|
4331
4356
|
visibleStartY: visibleStartY,
|
|
4332
|
-
visibleEndY: visibleEndY
|
|
4357
|
+
visibleEndY: visibleEndY,
|
|
4358
|
+
sliderTime: sliderTime
|
|
4333
4359
|
};
|
|
4334
4360
|
var tableTasks = React.useMemo(function () {
|
|
4335
4361
|
return ganttEvent.changedTask ? barTasks.map(function (t) {
|