gantt-task-react-v 1.0.9 → 1.0.10
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 +30 -15
- package/dist/gantt-task-react.umd.js +30 -15
- package/package.json +1 -1
|
@@ -13185,19 +13185,31 @@ const TaskGanttInner = (props) => {
|
|
|
13185
13185
|
horizontalContainerRef,
|
|
13186
13186
|
onVerticalScrollbarScrollX,
|
|
13187
13187
|
verticalGanttContainerRef,
|
|
13188
|
-
verticalScrollbarRef
|
|
13188
|
+
verticalScrollbarRef,
|
|
13189
|
+
ganttHeight
|
|
13189
13190
|
} = props;
|
|
13190
13191
|
const contentRef = React__default.useRef(null);
|
|
13191
13192
|
const moveStateVertRef = useRef(null);
|
|
13192
13193
|
const moveStateHorRef = useRef(null);
|
|
13193
13194
|
const moveStateScrollRef = useRef(null);
|
|
13194
|
-
const containerStyle = useMemo(
|
|
13195
|
-
|
|
13196
|
-
|
|
13195
|
+
const containerStyle = useMemo(() => {
|
|
13196
|
+
const minRowsHeight = minimumRowDisplayed * rowHeight;
|
|
13197
|
+
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
13198
|
+
const visible = Math.max(
|
|
13199
|
+
minRowsHeight,
|
|
13200
|
+
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
13201
|
+
);
|
|
13202
|
+
return {
|
|
13203
|
+
height: visible,
|
|
13197
13204
|
width: fullSvgWidth
|
|
13198
|
-
}
|
|
13199
|
-
|
|
13200
|
-
|
|
13205
|
+
};
|
|
13206
|
+
}, [
|
|
13207
|
+
ganttFullHeight,
|
|
13208
|
+
minimumRowDisplayed,
|
|
13209
|
+
rowHeight,
|
|
13210
|
+
fullSvgWidth,
|
|
13211
|
+
ganttHeight
|
|
13212
|
+
]);
|
|
13201
13213
|
const gridStyle = useMemo(
|
|
13202
13214
|
() => ({
|
|
13203
13215
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13281,15 +13293,18 @@ const TaskGanttInner = (props) => {
|
|
|
13281
13293
|
moveStateHorRef.current = null;
|
|
13282
13294
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13283
13295
|
};
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
contentContainer.addEventListener("
|
|
13296
|
+
const moveListener = (evt) => onScrollMove(evt);
|
|
13297
|
+
const startListener = (evt) => onScrollStart(evt);
|
|
13298
|
+
const endListener = (evt) => onScrollEnd(evt);
|
|
13299
|
+
contentContainer.addEventListener("mousemove", moveListener);
|
|
13300
|
+
contentContainer.addEventListener("mousedown", startListener);
|
|
13301
|
+
contentContainer.addEventListener("mouseup", endListener);
|
|
13302
|
+
contentContainer.addEventListener("mouseout", endListener);
|
|
13288
13303
|
return () => {
|
|
13289
|
-
contentContainer.removeEventListener("mousemove",
|
|
13290
|
-
contentContainer.removeEventListener("mousedown",
|
|
13291
|
-
contentContainer.removeEventListener("mouseup",
|
|
13292
|
-
contentContainer.removeEventListener("mouseout",
|
|
13304
|
+
contentContainer.removeEventListener("mousemove", moveListener);
|
|
13305
|
+
contentContainer.removeEventListener("mousedown", startListener);
|
|
13306
|
+
contentContainer.removeEventListener("mouseup", endListener);
|
|
13307
|
+
contentContainer.removeEventListener("mouseout", endListener);
|
|
13293
13308
|
};
|
|
13294
13309
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13295
13310
|
return /* @__PURE__ */ jsxs(
|
|
@@ -13202,19 +13202,31 @@
|
|
|
13202
13202
|
horizontalContainerRef,
|
|
13203
13203
|
onVerticalScrollbarScrollX,
|
|
13204
13204
|
verticalGanttContainerRef,
|
|
13205
|
-
verticalScrollbarRef
|
|
13205
|
+
verticalScrollbarRef,
|
|
13206
|
+
ganttHeight
|
|
13206
13207
|
} = props;
|
|
13207
13208
|
const contentRef = React.useRef(null);
|
|
13208
13209
|
const moveStateVertRef = React.useRef(null);
|
|
13209
13210
|
const moveStateHorRef = React.useRef(null);
|
|
13210
13211
|
const moveStateScrollRef = React.useRef(null);
|
|
13211
|
-
const containerStyle = React.useMemo(
|
|
13212
|
-
|
|
13213
|
-
|
|
13212
|
+
const containerStyle = React.useMemo(() => {
|
|
13213
|
+
const minRowsHeight = minimumRowDisplayed * rowHeight;
|
|
13214
|
+
const resolved = typeof ganttHeight === "number" ? ganttHeight : void 0;
|
|
13215
|
+
const visible = Math.max(
|
|
13216
|
+
minRowsHeight,
|
|
13217
|
+
Math.min(ganttFullHeight, resolved ?? ganttFullHeight)
|
|
13218
|
+
);
|
|
13219
|
+
return {
|
|
13220
|
+
height: visible,
|
|
13214
13221
|
width: fullSvgWidth
|
|
13215
|
-
}
|
|
13216
|
-
|
|
13217
|
-
|
|
13222
|
+
};
|
|
13223
|
+
}, [
|
|
13224
|
+
ganttFullHeight,
|
|
13225
|
+
minimumRowDisplayed,
|
|
13226
|
+
rowHeight,
|
|
13227
|
+
fullSvgWidth,
|
|
13228
|
+
ganttHeight
|
|
13229
|
+
]);
|
|
13218
13230
|
const gridStyle = React.useMemo(
|
|
13219
13231
|
() => ({
|
|
13220
13232
|
height: Math.max(ganttFullHeight, minimumRowDisplayed * rowHeight),
|
|
@@ -13298,15 +13310,18 @@
|
|
|
13298
13310
|
moveStateHorRef.current = null;
|
|
13299
13311
|
contentContainer.classList.remove(styles$2.calendarDragging);
|
|
13300
13312
|
};
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
contentContainer.addEventListener("
|
|
13313
|
+
const moveListener = (evt) => onScrollMove(evt);
|
|
13314
|
+
const startListener = (evt) => onScrollStart(evt);
|
|
13315
|
+
const endListener = (evt) => onScrollEnd(evt);
|
|
13316
|
+
contentContainer.addEventListener("mousemove", moveListener);
|
|
13317
|
+
contentContainer.addEventListener("mousedown", startListener);
|
|
13318
|
+
contentContainer.addEventListener("mouseup", endListener);
|
|
13319
|
+
contentContainer.addEventListener("mouseout", endListener);
|
|
13305
13320
|
return () => {
|
|
13306
|
-
contentContainer.removeEventListener("mousemove",
|
|
13307
|
-
contentContainer.removeEventListener("mousedown",
|
|
13308
|
-
contentContainer.removeEventListener("mouseup",
|
|
13309
|
-
contentContainer.removeEventListener("mouseout",
|
|
13321
|
+
contentContainer.removeEventListener("mousemove", moveListener);
|
|
13322
|
+
contentContainer.removeEventListener("mousedown", startListener);
|
|
13323
|
+
contentContainer.removeEventListener("mouseup", endListener);
|
|
13324
|
+
contentContainer.removeEventListener("mouseout", endListener);
|
|
13310
13325
|
};
|
|
13311
13326
|
}, [verticalScrollbarRef, horizontalContainerRef, verticalGanttContainerRef]);
|
|
13312
13327
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
package/package.json
CHANGED