gantt-task-react-v 1.2.9 → 1.2.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.
@@ -11113,22 +11113,15 @@ const calculateDataDatePosition = ({
11113
11113
  viewMode,
11114
11114
  columnWidth
11115
11115
  }) => {
11116
- const virtualMilestone = {
11117
- id: "virtual-data-date-milestone",
11118
- type: "milestone",
11119
- name: "Data Date",
11120
- start: dataDate,
11121
- end: dataDate,
11122
- // Same as start date for milestone
11123
- progress: 100
11124
- };
11125
- const milestoneEndPosition = taskXCoordinate(
11126
- virtualMilestone.end,
11116
+ const milestoneCenter = taskXCoordinate(
11117
+ dataDate,
11127
11118
  startDate,
11128
11119
  viewMode,
11129
11120
  columnWidth
11130
11121
  );
11131
- return milestoneEndPosition;
11122
+ const taskHeight = 32;
11123
+ const milestoneRightEdge = milestoneCenter + taskHeight * 0.5;
11124
+ return milestoneRightEdge;
11132
11125
  };
11133
11126
  const GanttTodayInner = ({
11134
11127
  additionalLeftSpace,
@@ -11130,22 +11130,15 @@
11130
11130
  viewMode,
11131
11131
  columnWidth
11132
11132
  }) => {
11133
- const virtualMilestone = {
11134
- id: "virtual-data-date-milestone",
11135
- type: "milestone",
11136
- name: "Data Date",
11137
- start: dataDate,
11138
- end: dataDate,
11139
- // Same as start date for milestone
11140
- progress: 100
11141
- };
11142
- const milestoneEndPosition = taskXCoordinate(
11143
- virtualMilestone.end,
11133
+ const milestoneCenter = taskXCoordinate(
11134
+ dataDate,
11144
11135
  startDate,
11145
11136
  viewMode,
11146
11137
  columnWidth
11147
11138
  );
11148
- return milestoneEndPosition;
11139
+ const taskHeight = 32;
11140
+ const milestoneRightEdge = milestoneCenter + taskHeight * 0.5;
11141
+ return milestoneRightEdge;
11149
11142
  };
11150
11143
  const GanttTodayInner = ({
11151
11144
  additionalLeftSpace,
@@ -11,4 +11,8 @@ export interface DataDatePositionOptions {
11
11
  * Calculate data date line position by creating a virtual milestone bar for the data date
12
12
  * and positioning the line at the end of that milestone bar (just like the custom frontend fix)
13
13
  */
14
+ /**
15
+ * Calculate data date line position by positioning it at the right edge of where a milestone
16
+ * would be positioned (exactly matching the actual milestone positioning logic)
17
+ */
14
18
  export declare const calculateDataDatePosition: ({ dataDate, startDate, viewMode, columnWidth, }: DataDatePositionOptions) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.2.9",
3
+ "version": "1.2.11",
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",