gantt-task-react-powern 0.6.10 → 0.6.12
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 +7 -13
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +7 -13
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3109,7 +3109,9 @@ var Gantt = function Gantt(_ref) {
|
|
|
3109
3109
|
setFailedTask = _useState9[1];
|
|
3110
3110
|
|
|
3111
3111
|
var svgWidth = columnWidth < 55 ? (dateSetup.dates.length + 0.5) * columnWidth : dateSetup.dates.length * columnWidth;
|
|
3112
|
-
var ganttFullHeight =
|
|
3112
|
+
var ganttFullHeight = React.useMemo(function () {
|
|
3113
|
+
return barTasks.length * rowHeight;
|
|
3114
|
+
}, [barTasks.length, rowHeight]);
|
|
3113
3115
|
|
|
3114
3116
|
var _useState10 = React.useState(0),
|
|
3115
3117
|
scrollY = _useState10[0],
|
|
@@ -3154,13 +3156,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3154
3156
|
setIsProcessing(true);
|
|
3155
3157
|
debounceRef.current = setTimeout(function () {
|
|
3156
3158
|
var filteredTasks;
|
|
3157
|
-
|
|
3158
|
-
if (onExpanderClick) {
|
|
3159
|
-
filteredTasks = removeHiddenTasks(tasks);
|
|
3160
|
-
} else {
|
|
3161
|
-
filteredTasks = tasks;
|
|
3162
|
-
}
|
|
3163
|
-
|
|
3159
|
+
filteredTasks = removeHiddenTasks(tasks);
|
|
3164
3160
|
filteredTasks = filteredTasks.sort(sortTasks);
|
|
3165
3161
|
|
|
3166
3162
|
var _ganttDateRange2 = ganttDateRange(filteredTasks, viewMode, preStepsCount),
|
|
@@ -3202,7 +3198,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3202
3198
|
setBarTasks(convertToBarTasks(filteredTasks, newDates, columnWidth, rowHeight, taskHeight, barCornerRadius, handleWidth, rtl, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor));
|
|
3203
3199
|
setIsProcessing(false);
|
|
3204
3200
|
}, delayToRender);
|
|
3205
|
-
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl
|
|
3201
|
+
}, [tasks, viewMode, preStepsCount, rowHeight, barCornerRadius, columnWidth, taskHeight, handleWidth, barProgressColor, barProgressSelectedColor, barBackgroundColor, barBackgroundSelectedColor, projectProgressColor, projectProgressSelectedColor, projectBackgroundColor, projectBackgroundSelectedColor, milestoneBackgroundColor, milestoneBackgroundSelectedColor, rtl]);
|
|
3206
3202
|
React.useEffect(function () {
|
|
3207
3203
|
return function () {
|
|
3208
3204
|
clearTimeout(debounceRef.current);
|
|
@@ -3281,8 +3277,6 @@ var Gantt = function Gantt(_ref) {
|
|
|
3281
3277
|
React.useEffect(function () {
|
|
3282
3278
|
var _wrapperRef$current, _wrapperRef$current2, _wrapperRef$current3, _wrapperRef$current4;
|
|
3283
3279
|
|
|
3284
|
-
if (isProcessing) return;
|
|
3285
|
-
|
|
3286
3280
|
var handleWheel = function handleWheel(event) {
|
|
3287
3281
|
if (event.shiftKey || event.deltaX) {
|
|
3288
3282
|
var scrollMove = event.deltaX ? event.deltaX : event.deltaY;
|
|
@@ -3375,7 +3369,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3375
3369
|
(_wrapperRef$current7 = wrapperRef.current) === null || _wrapperRef$current7 === void 0 ? void 0 : _wrapperRef$current7.removeEventListener("touchend", handleLogTouch);
|
|
3376
3370
|
(_wrapperRef$current8 = wrapperRef.current) === null || _wrapperRef$current8 === void 0 ? void 0 : _wrapperRef$current8.removeEventListener("touchend", handleLogTouch);
|
|
3377
3371
|
};
|
|
3378
|
-
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight
|
|
3372
|
+
}, [wrapperRef, scrollY, scrollX, ganttHeight, svgWidth, rtl, ganttFullHeight]);
|
|
3379
3373
|
|
|
3380
3374
|
var handleScrollY = function handleScrollY(event) {
|
|
3381
3375
|
if (scrollY !== event.currentTarget.scrollTop && !ignoreScrollEvent) {
|
|
@@ -3553,7 +3547,7 @@ var Gantt = function Gantt(_ref) {
|
|
|
3553
3547
|
className: styles$9.wrapper,
|
|
3554
3548
|
style: {
|
|
3555
3549
|
position: "relative",
|
|
3556
|
-
minHeight: ganttHeight ||
|
|
3550
|
+
minHeight: ganttHeight + 70 || 400
|
|
3557
3551
|
}
|
|
3558
3552
|
}, React__default.createElement("div", {
|
|
3559
3553
|
style: {
|