gantt-task-react-v 1.0.9 → 1.0.11
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/gantt-task-react.es.js +41 -19
- package/dist/gantt-task-react.umd.js +41 -19
- package/package.json +1 -1
|
@@ -10829,10 +10829,17 @@ const TaskListInner = ({
|
|
|
10829
10829
|
ref: taskListContainerRef,
|
|
10830
10830
|
className: styles$d.horizontalContainer,
|
|
10831
10831
|
style: {
|
|
10832
|
-
height:
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10832
|
+
// visible height: clamp between minimum rows height and ganttFullHeight,
|
|
10833
|
+
// prefer explicit numeric ganttHeight when provided
|
|
10834
|
+
height: (() => {
|
|
10835
|
+
const minRowsHeight = distances.minimumRowDisplayed * distances.rowHeight;
|
|
10836
|
+
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
10837
|
+
const visible = Math.max(
|
|
10838
|
+
minRowsHeight,
|
|
10839
|
+
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
10840
|
+
);
|
|
10841
|
+
return visible;
|
|
10842
|
+
})(),
|
|
10836
10843
|
width: taskListWidth
|
|
10837
10844
|
},
|
|
10838
10845
|
children: /* @__PURE__ */ jsx(
|
|
@@ -13185,19 +13192,31 @@ const TaskGanttInner = (props) => {
|
|
|
13185
13192
|
horizontalContainerRef,
|
|
13186
13193
|
onVerticalScrollbarScrollX,
|
|
13187
13194
|
verticalGanttContainerRef,
|
|
13188
|
-
verticalScrollbarRef
|
|
13195
|
+
verticalScrollbarRef,
|
|
13196
|
+
ganttHeight
|
|
13189
13197
|
} = props;
|
|
13190
13198
|
const contentRef = React__default.useRef(null);
|
|
13191
13199
|
const moveStateVertRef = useRef(null);
|
|
13192
13200
|
const moveStateHorRef = useRef(null);
|
|
13193
13201
|
const moveStateScrollRef = useRef(null);
|
|
13194
|
-
const containerStyle = useMemo(
|
|
13195
|
-
|
|
13196
|
-
|
|
13202
|
+
const containerStyle = useMemo(() => {
|
|
13203
|
+
const minRowsHeight = minimumRowDisplayed * rowHeight;
|
|
13204
|
+
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
13205
|
+
const visible = Math.max(
|
|
13206
|
+
minRowsHeight,
|
|
13207
|
+
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
13208
|
+
);
|
|
13209
|
+
return {
|
|
13210
|
+
height: visible,
|
|
13197
13211
|
width: fullSvgWidth
|
|
13198
|
-
}
|
|
13199
|
-
|
|
13200
|
-
|
|
13212
|
+
};
|
|
13213
|
+
}, [
|
|
13214
|
+
ganttFullHeight,
|
|
13215
|
+
minimumRowDisplayed,
|
|
13216
|
+
rowHeight,
|
|
13217
|
+
fullSvgWidth,
|
|
13218
|
+
ganttHeight
|
|
13219
|
+
]);
|
|
13201
13220
|
const gridStyle = useMemo(
|
|
13202
13221
|
() => ({
|
|
13203
13222
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13281,15 +13300,18 @@ const TaskGanttInner = (props) => {
|
|
|
13281
13300
|
moveStateHorRef.current = null;
|
|
13282
13301
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13283
13302
|
};
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
contentContainer.addEventListener("
|
|
13303
|
+
const moveListener = (evt) => onScrollMove(evt);
|
|
13304
|
+
const startListener = (evt) => onScrollStart(evt);
|
|
13305
|
+
const endListener = (evt) => onScrollEnd(evt);
|
|
13306
|
+
contentContainer.addEventListener("mousemove", moveListener);
|
|
13307
|
+
contentContainer.addEventListener("mousedown", startListener);
|
|
13308
|
+
contentContainer.addEventListener("mouseup", endListener);
|
|
13309
|
+
contentContainer.addEventListener("mouseout", endListener);
|
|
13288
13310
|
return () => {
|
|
13289
|
-
contentContainer.removeEventListener("mousemove",
|
|
13290
|
-
contentContainer.removeEventListener("mousedown",
|
|
13291
|
-
contentContainer.removeEventListener("mouseup",
|
|
13292
|
-
contentContainer.removeEventListener("mouseout",
|
|
13311
|
+
contentContainer.removeEventListener("mousemove", moveListener);
|
|
13312
|
+
contentContainer.removeEventListener("mousedown", startListener);
|
|
13313
|
+
contentContainer.removeEventListener("mouseup", endListener);
|
|
13314
|
+
contentContainer.removeEventListener("mouseout", endListener);
|
|
13293
13315
|
};
|
|
13294
13316
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13295
13317
|
return /* @__PURE__ */ jsxs(
|
|
@@ -10846,10 +10846,17 @@
|
|
|
10846
10846
|
ref: taskListContainerRef,
|
|
10847
10847
|
className: styles$d.horizontalContainer,
|
|
10848
10848
|
style: {
|
|
10849
|
-
height:
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10849
|
+
// visible height: clamp between minimum rows height and ganttFullHeight,
|
|
10850
|
+
// prefer explicit numeric ganttHeight when provided
|
|
10851
|
+
height: (() => {
|
|
10852
|
+
const minRowsHeight = distances.minimumRowDisplayed * distances.rowHeight;
|
|
10853
|
+
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
10854
|
+
const visible = Math.max(
|
|
10855
|
+
minRowsHeight,
|
|
10856
|
+
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
10857
|
+
);
|
|
10858
|
+
return visible;
|
|
10859
|
+
})(),
|
|
10853
10860
|
width: taskListWidth
|
|
10854
10861
|
},
|
|
10855
10862
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13202,19 +13209,31 @@
|
|
|
13202
13209
|
horizontalContainerRef,
|
|
13203
13210
|
onVerticalScrollbarScrollX,
|
|
13204
13211
|
verticalGanttContainerRef,
|
|
13205
|
-
verticalScrollbarRef
|
|
13212
|
+
verticalScrollbarRef,
|
|
13213
|
+
ganttHeight
|
|
13206
13214
|
} = props;
|
|
13207
13215
|
const contentRef = React.useRef(null);
|
|
13208
13216
|
const moveStateVertRef = React.useRef(null);
|
|
13209
13217
|
const moveStateHorRef = React.useRef(null);
|
|
13210
13218
|
const moveStateScrollRef = React.useRef(null);
|
|
13211
|
-
const containerStyle = React.useMemo(
|
|
13212
|
-
|
|
13213
|
-
|
|
13219
|
+
const containerStyle = React.useMemo(() => {
|
|
13220
|
+
const minRowsHeight = minimumRowDisplayed * rowHeight;
|
|
13221
|
+
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
13222
|
+
const visible = Math.max(
|
|
13223
|
+
minRowsHeight,
|
|
13224
|
+
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
13225
|
+
);
|
|
13226
|
+
return {
|
|
13227
|
+
height: visible,
|
|
13214
13228
|
width: fullSvgWidth
|
|
13215
|
-
}
|
|
13216
|
-
|
|
13217
|
-
|
|
13229
|
+
};
|
|
13230
|
+
}, [
|
|
13231
|
+
ganttFullHeight,
|
|
13232
|
+
minimumRowDisplayed,
|
|
13233
|
+
rowHeight,
|
|
13234
|
+
fullSvgWidth,
|
|
13235
|
+
ganttHeight
|
|
13236
|
+
]);
|
|
13218
13237
|
const gridStyle = React.useMemo(
|
|
13219
13238
|
() => ({
|
|
13220
13239
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13298,15 +13317,18 @@
|
|
|
13298
13317
|
moveStateHorRef.current = null;
|
|
13299
13318
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13300
13319
|
};
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
contentContainer.addEventListener("
|
|
13320
|
+
const moveListener = (evt) => onScrollMove(evt);
|
|
13321
|
+
const startListener = (evt) => onScrollStart(evt);
|
|
13322
|
+
const endListener = (evt) => onScrollEnd(evt);
|
|
13323
|
+
contentContainer.addEventListener("mousemove", moveListener);
|
|
13324
|
+
contentContainer.addEventListener("mousedown", startListener);
|
|
13325
|
+
contentContainer.addEventListener("mouseup", endListener);
|
|
13326
|
+
contentContainer.addEventListener("mouseout", endListener);
|
|
13305
13327
|
return () => {
|
|
13306
|
-
contentContainer.removeEventListener("mousemove",
|
|
13307
|
-
contentContainer.removeEventListener("mousedown",
|
|
13308
|
-
contentContainer.removeEventListener("mouseup",
|
|
13309
|
-
contentContainer.removeEventListener("mouseout",
|
|
13328
|
+
contentContainer.removeEventListener("mousemove", moveListener);
|
|
13329
|
+
contentContainer.removeEventListener("mousedown", startListener);
|
|
13330
|
+
contentContainer.removeEventListener("mouseup", endListener);
|
|
13331
|
+
contentContainer.removeEventListener("mouseout", endListener);
|
|
13310
13332
|
};
|
|
13311
13333
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13312
13334
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
package/package.json
CHANGED