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