gantt-task-react-v 1.1.0 → 1.1.1

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.
@@ -8,6 +8,7 @@ export type GanttTodayProps = {
8
8
  startDate: Date;
9
9
  rtl: boolean;
10
10
  viewMode: ViewMode;
11
+ taskHeight: number;
11
12
  showTodayLine?: boolean;
12
13
  showDataDateLine?: boolean;
13
14
  dataDate?: Date | null;
@@ -11113,6 +11113,8 @@ const GanttTodayInner = ({
11113
11113
  rtl,
11114
11114
  startDate,
11115
11115
  viewMode,
11116
+ taskHeight,
11117
+ // Add taskHeight parameter
11116
11118
  showTodayLine = true,
11117
11119
  showDataDateLine = false,
11118
11120
  dataDate = null,
@@ -11178,8 +11180,9 @@ const GanttTodayInner = ({
11178
11180
  if (!showDataDateLine || !dataDate) {
11179
11181
  return null;
11180
11182
  }
11181
- const x = taskXCoordinate(dataDate, startDate, viewMode, columnWidth);
11182
- const adjustedX = rtl ? x + columnWidth : x;
11183
+ const dateX = taskXCoordinate(dataDate, startDate, viewMode, columnWidth);
11184
+ const milestoneEndX = dateX + taskHeight * 0.5;
11185
+ const adjustedX = rtl ? milestoneEndX + columnWidth : milestoneEndX;
11183
11186
  const color = dataDateColor || "var(--gantt-calendar-today-color)";
11184
11187
  return /* @__PURE__ */ jsxs(Fragment, { children: [
11185
11188
  /* @__PURE__ */ jsx(
@@ -11222,6 +11225,7 @@ const GanttTodayInner = ({
11222
11225
  rtl,
11223
11226
  startDate,
11224
11227
  viewMode,
11228
+ taskHeight,
11225
11229
  showDataDateLine,
11226
11230
  dataDate,
11227
11231
  dataDateColor,
@@ -19860,6 +19864,7 @@ const Gantt = (props) => {
19860
19864
  rtl,
19861
19865
  startDate,
19862
19866
  viewMode,
19867
+ taskHeight,
19863
19868
  showTodayLine,
19864
19869
  showDataDateLine,
19865
19870
  dataDate,
@@ -19876,6 +19881,7 @@ const Gantt = (props) => {
19876
19881
  rtl,
19877
19882
  startDate,
19878
19883
  viewMode,
19884
+ taskHeight,
19879
19885
  showTodayLine,
19880
19886
  showDataDateLine,
19881
19887
  dataDate,
@@ -11130,6 +11130,8 @@
11130
11130
  rtl,
11131
11131
  startDate,
11132
11132
  viewMode,
11133
+ taskHeight,
11134
+ // Add taskHeight parameter
11133
11135
  showTodayLine = true,
11134
11136
  showDataDateLine = false,
11135
11137
  dataDate = null,
@@ -11195,8 +11197,9 @@
11195
11197
  if (!showDataDateLine || !dataDate) {
11196
11198
  return null;
11197
11199
  }
11198
- const x = taskXCoordinate(dataDate, startDate, viewMode, columnWidth);
11199
- const adjustedX = rtl ? x + columnWidth : x;
11200
+ const dateX = taskXCoordinate(dataDate, startDate, viewMode, columnWidth);
11201
+ const milestoneEndX = dateX + taskHeight * 0.5;
11202
+ const adjustedX = rtl ? milestoneEndX + columnWidth : milestoneEndX;
11200
11203
  const color = dataDateColor || "var(--gantt-calendar-today-color)";
11201
11204
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11202
11205
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -11239,6 +11242,7 @@
11239
11242
  rtl,
11240
11243
  startDate,
11241
11244
  viewMode,
11245
+ taskHeight,
11242
11246
  showDataDateLine,
11243
11247
  dataDate,
11244
11248
  dataDateColor,
@@ -19877,6 +19881,7 @@
19877
19881
  rtl,
19878
19882
  startDate,
19879
19883
  viewMode,
19884
+ taskHeight,
19880
19885
  showTodayLine,
19881
19886
  showDataDateLine,
19882
19887
  dataDate,
@@ -19893,6 +19898,7 @@
19893
19898
  rtl,
19894
19899
  startDate,
19895
19900
  viewMode,
19901
+ taskHeight,
19896
19902
  showTodayLine,
19897
19903
  showDataDateLine,
19898
19904
  dataDate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Interactive Gantt Chart for React with TypeScript.",
5
5
  "author": "aguilanbon",
6
6
  "homepage": "https://github.com/aguilanbon/gantt-task-react-v",