gantt-lib 0.63.0 → 0.64.0

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.mjs CHANGED
@@ -4550,12 +4550,11 @@ var TaskListRow = React9.memo(
4550
4550
  }, [editingTaskId, task.id, disableTaskNameEditing]);
4551
4551
  const handleNameClick = useCallback4(
4552
4552
  (e) => {
4553
- if (disableTaskNameEditing) return;
4554
4553
  e.stopPropagation();
4555
4554
  onRowClick?.(task.id);
4556
4555
  onScrollToTask?.(task.id);
4557
4556
  },
4558
- [task.id, disableTaskNameEditing, onRowClick, onScrollToTask]
4557
+ [task.id, onRowClick, onScrollToTask]
4559
4558
  );
4560
4559
  const handleNameDoubleClick = useCallback4(
4561
4560
  (e) => {
@@ -6984,7 +6983,7 @@ function GanttChartInner(props, ref) {
6984
6983
  if (todayIndex === -1) return;
6985
6984
  const todayOffset = todayIndex * dayWidth;
6986
6985
  const containerWidth = container.clientWidth;
6987
- const scrollLeft = Math.round(todayOffset - containerWidth / 2 + dayWidth / 2);
6986
+ const scrollLeft = Math.round(todayOffset + dayWidth / 2 - containerWidth * 0.3);
6988
6987
  container.scrollLeft = Math.max(0, scrollLeft);
6989
6988
  }, []);
6990
6989
  useEffect7(() => {
@@ -7008,7 +7007,7 @@ function GanttChartInner(props, ref) {
7008
7007
  if (todayIndex === -1) return;
7009
7008
  const todayOffset = todayIndex * dayWidth;
7010
7009
  const containerWidth = container.clientWidth;
7011
- const scrollLeft = Math.round(todayOffset - containerWidth / 2 + dayWidth / 2);
7010
+ const scrollLeft = Math.round(todayOffset + dayWidth / 2 - containerWidth * 0.3);
7012
7011
  container.scrollTo({ left: Math.max(0, scrollLeft), behavior: "smooth" });
7013
7012
  }, [dateRange, dayWidth]);
7014
7013
  const scrollToTask = useCallback6((taskId) => {