gantt-task-react-v 1.4.1 → 1.4.3

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.
@@ -17,6 +17,10 @@ type ArrowProps = {
17
17
  isCritical: boolean;
18
18
  rtl: boolean;
19
19
  onArrowDoubleClick?: (taskFrom: Task, taskTo: Task) => void;
20
+ fromConnectionIndex?: number;
21
+ fromTotalConnections?: number;
22
+ toConnectionIndex?: number;
23
+ toTotalConnections?: number;
20
24
  };
21
25
  export declare const Arrow: React.NamedExoticComponent<ArrowProps>;
22
26
  export {};
@@ -11727,9 +11727,9 @@ const generateTrianglePoints = (x, y, width, isLeftDirected) => {
11727
11727
  ${x - width},${y - width}
11728
11728
  ${x - width},${y + width}`;
11729
11729
  };
11730
- const arrow_clickable = "_arrow_clickable_3bsl2_1";
11731
- const mainPath = "_mainPath_3bsl2_11";
11732
- const clickZone = "_clickZone_3bsl2_43";
11730
+ const arrow_clickable = "_arrow_clickable_m4fqb_1";
11731
+ const mainPath = "_mainPath_m4fqb_11";
11732
+ const clickZone = "_clickZone_m4fqb_57";
11733
11733
  const styles$a = {
11734
11734
  arrow_clickable,
11735
11735
  mainPath,
@@ -11752,7 +11752,11 @@ const ArrowInner = (props) => {
11752
11752
  taskHeight,
11753
11753
  isCritical,
11754
11754
  rtl,
11755
- onArrowDoubleClick = void 0
11755
+ onArrowDoubleClick = void 0,
11756
+ fromConnectionIndex = 0,
11757
+ fromTotalConnections = 1,
11758
+ toConnectionIndex = 0,
11759
+ toTotalConnections = 1
11756
11760
  } = props;
11757
11761
  const indexFrom = useMemo(
11758
11762
  () => Math.floor(fromY / fullRowHeight),
@@ -11781,7 +11785,11 @@ const ArrowInner = (props) => {
11781
11785
  targetTo === "startOfTask" !== rtl,
11782
11786
  fullRowHeight,
11783
11787
  taskHeight,
11784
- arrowIndent
11788
+ arrowIndent,
11789
+ fromConnectionIndex,
11790
+ fromTotalConnections,
11791
+ toConnectionIndex,
11792
+ toTotalConnections
11785
11793
  ),
11786
11794
  [
11787
11795
  indexFrom,
@@ -11797,7 +11805,11 @@ const ArrowInner = (props) => {
11797
11805
  rtl,
11798
11806
  fullRowHeight,
11799
11807
  taskHeight,
11800
- arrowIndent
11808
+ arrowIndent,
11809
+ fromConnectionIndex,
11810
+ fromTotalConnections,
11811
+ toConnectionIndex,
11812
+ toTotalConnections
11801
11813
  ]
11802
11814
  );
11803
11815
  const color = useMemo(() => {
@@ -11821,19 +11833,76 @@ const ArrowInner = (props) => {
11821
11833
  ) });
11822
11834
  };
11823
11835
  const Arrow = memo(ArrowInner);
11824
- const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSide, indexTo, toX1, toX2, toY, isTaskToLeftSide, fullRowHeight, taskHeight, arrowIndent) => {
11836
+ const roundedPath = (points, radius) => {
11837
+ if (points.length < 2)
11838
+ return "";
11839
+ let d = `M ${points[0][0]} ${points[0][1]}`;
11840
+ for (let i = 1; i < points.length - 1; i++) {
11841
+ const prev = points[i - 1];
11842
+ const curr = points[i];
11843
+ const next = points[i + 1];
11844
+ const dx1 = prev[0] - curr[0];
11845
+ const dy1 = prev[1] - curr[1];
11846
+ const len1 = Math.abs(dx1) + Math.abs(dy1);
11847
+ const dx2 = next[0] - curr[0];
11848
+ const dy2 = next[1] - curr[1];
11849
+ const len2 = Math.abs(dx2) + Math.abs(dy2);
11850
+ const r = Math.min(radius, len1 / 2, len2 / 2);
11851
+ if (r <= 0 || len1 === 0 || len2 === 0) {
11852
+ d += ` L ${curr[0]} ${curr[1]}`;
11853
+ continue;
11854
+ }
11855
+ const ux1 = dx1 === 0 ? 0 : dx1 / Math.abs(dx1);
11856
+ const uy1 = dy1 === 0 ? 0 : dy1 / Math.abs(dy1);
11857
+ const ux2 = dx2 === 0 ? 0 : dx2 / Math.abs(dx2);
11858
+ const uy2 = dy2 === 0 ? 0 : dy2 / Math.abs(dy2);
11859
+ d += ` L ${curr[0] + ux1 * r} ${curr[1] + uy1 * r}`;
11860
+ d += ` Q ${curr[0]} ${curr[1]} ${curr[0] + ux2 * r} ${curr[1] + uy2 * r}`;
11861
+ }
11862
+ const last = points[points.length - 1];
11863
+ d += ` L ${last[0]} ${last[1]}`;
11864
+ return d;
11865
+ };
11866
+ const ARROW_CORNER_RADIUS = 8;
11867
+ const MAX_EXTRA_INDENT = 20;
11868
+ const CONNECTION_SPREAD_RATIO = 0.35;
11869
+ const MAX_CORRIDOR_SPREAD = 20;
11870
+ const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSide, indexTo, toX1, toX2, toY, isTaskToLeftSide, fullRowHeight, taskHeight, arrowIndent, fromConnectionIndex, fromTotalConnections, toConnectionIndex, toTotalConnections) => {
11825
11871
  const isDownDirected = indexTo > indexForm;
11826
- const horizontalDockingY = isDownDirected ? (indexForm + 1) * fullRowHeight : indexForm * fullRowHeight;
11827
- const taskFromEndPositionX = isTaskFromLeftSide ? fromX1 - arrowIndent : fromX2 + arrowIndent;
11828
- const taskToEndPositionX = isTaskToLeftSide ? toX1 - arrowIndent : toX2 + arrowIndent;
11829
- const taskToEndPositionY = toY + taskHeight / 2;
11830
- const path = `M ${isTaskFromLeftSide ? fromX1 : fromX2} ${fromY + taskHeight / 2}
11831
- H ${taskFromEndPositionX}
11832
- V ${horizontalDockingY}
11833
- H ${taskToEndPositionX}
11834
- V ${taskToEndPositionY}
11835
- H ${isTaskToLeftSide ? toX1 : toX2}`;
11836
- const trianglePoints = isTaskToLeftSide ? generateTrianglePoints(toX1, taskToEndPositionY, 5, false) : generateTrianglePoints(toX2, taskToEndPositionY, 5, true);
11872
+ const fromVertOffset = fromTotalConnections <= 1 ? 0 : (fromConnectionIndex / (fromTotalConnections - 1) - 0.5) * taskHeight * CONNECTION_SPREAD_RATIO;
11873
+ const toVertOffset = toTotalConnections <= 1 ? 0 : (toConnectionIndex / (toTotalConnections - 1) - 0.5) * taskHeight * CONNECTION_SPREAD_RATIO;
11874
+ const fromIndentSpacing = fromTotalConnections <= 1 ? 0 : MAX_EXTRA_INDENT / (fromTotalConnections - 1);
11875
+ const toIndentSpacing = toTotalConnections <= 1 ? 0 : MAX_EXTRA_INDENT / (toTotalConnections - 1);
11876
+ const fromIndent = arrowIndent + fromConnectionIndex * fromIndentSpacing;
11877
+ const toIndent = arrowIndent + toConnectionIndex * toIndentSpacing;
11878
+ const corridorHash = (fromConnectionIndex * 7 + toConnectionIndex * 13) % 11 / 10;
11879
+ const corridorSpread = Math.min(fullRowHeight * 0.35, MAX_CORRIDOR_SPREAD);
11880
+ const corridorOffset = (corridorHash - 0.5) * corridorSpread;
11881
+ const horizontalDockingY = isDownDirected ? (indexForm + 1) * fullRowHeight + corridorOffset : indexForm * fullRowHeight + corridorOffset;
11882
+ const taskFromEndPositionX = isTaskFromLeftSide ? fromX1 - fromIndent : fromX2 + fromIndent;
11883
+ const taskToEndPositionX = isTaskToLeftSide ? toX1 - toIndent : toX2 + toIndent;
11884
+ const startX = isTaskFromLeftSide ? fromX1 : fromX2;
11885
+ const startY = fromY + taskHeight / 2 + fromVertOffset;
11886
+ const endX = isTaskToLeftSide ? toX1 : toX2;
11887
+ const endY = toY + taskHeight / 2 + toVertOffset;
11888
+ const rawWaypoints = [
11889
+ [startX, startY],
11890
+ [taskFromEndPositionX, startY],
11891
+ [taskFromEndPositionX, horizontalDockingY],
11892
+ [taskToEndPositionX, horizontalDockingY],
11893
+ [taskToEndPositionX, endY],
11894
+ [endX, endY]
11895
+ ];
11896
+ const waypoints = [rawWaypoints[0]];
11897
+ for (let i = 1; i < rawWaypoints.length; i++) {
11898
+ const prev = waypoints[waypoints.length - 1];
11899
+ const curr = rawWaypoints[i];
11900
+ if (Math.abs(curr[0] - prev[0]) > 0.5 || Math.abs(curr[1] - prev[1]) > 0.5) {
11901
+ waypoints.push(curr);
11902
+ }
11903
+ }
11904
+ const path = roundedPath(waypoints, ARROW_CORNER_RADIUS);
11905
+ const trianglePoints = isTaskToLeftSide ? generateTrianglePoints(toX1, endY, 5, false) : generateTrianglePoints(toX2, endY, 5, true);
11837
11906
  return [path, trianglePoints];
11838
11907
  };
11839
11908
  const relationLine = "_relationLine_wh2qy_1";
@@ -13132,6 +13201,31 @@ const TaskGanttContentInner = (props) => {
13132
13201
  taskById.set(task.id, task);
13133
13202
  }
13134
13203
  });
13204
+ const connectionTotals = /* @__PURE__ */ new Map();
13205
+ for (const [, dependenciesByLevel] of dependencyMap) {
13206
+ for (const [taskId, dependencies] of dependenciesByLevel) {
13207
+ for (const dep of dependencies) {
13208
+ if (!visibleTasksMirror[dep.source.id])
13209
+ continue;
13210
+ const sourceKey = `${dep.source.id}|${dep.sourceTarget}|out`;
13211
+ connectionTotals.set(
13212
+ sourceKey,
13213
+ (connectionTotals.get(sourceKey) || 0) + 1
13214
+ );
13215
+ const targetKey = `${taskId}|${dep.ownTarget}|in`;
13216
+ connectionTotals.set(
13217
+ targetKey,
13218
+ (connectionTotals.get(targetKey) || 0) + 1
13219
+ );
13220
+ }
13221
+ }
13222
+ }
13223
+ const connectionIndices = /* @__PURE__ */ new Map();
13224
+ const getConnectionIndex = (key2) => {
13225
+ const idx = connectionIndices.get(key2) || 0;
13226
+ connectionIndices.set(key2, idx + 1);
13227
+ return idx;
13228
+ };
13135
13229
  const addedSelectedTasks = {};
13136
13230
  const addedDependencies = {};
13137
13231
  for (let index2 = start; index2 <= end; ++index2) {
@@ -13341,7 +13435,17 @@ const TaskGanttContentInner = (props) => {
13341
13435
  taskHeight,
13342
13436
  isCritical: isCritical2,
13343
13437
  rtl,
13344
- onArrowDoubleClick
13438
+ onArrowDoubleClick,
13439
+ fromConnectionIndex: getConnectionIndex(
13440
+ `${source.id}|${sourceTarget}|out`
13441
+ ),
13442
+ fromTotalConnections: connectionTotals.get(
13443
+ `${source.id}|${sourceTarget}|out`
13444
+ ) || 1,
13445
+ toConnectionIndex: getConnectionIndex(
13446
+ `${taskId}|${ownTarget}|in`
13447
+ ),
13448
+ toTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|in`) || 1
13345
13449
  }
13346
13450
  )
13347
13451
  },
@@ -13415,7 +13519,17 @@ const TaskGanttContentInner = (props) => {
13415
13519
  taskHeight,
13416
13520
  isCritical: isCritical2,
13417
13521
  rtl,
13418
- onArrowDoubleClick
13522
+ onArrowDoubleClick,
13523
+ fromConnectionIndex: getConnectionIndex(
13524
+ `${taskId}|${ownTarget}|out`
13525
+ ),
13526
+ fromTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|out`) || 1,
13527
+ toConnectionIndex: getConnectionIndex(
13528
+ `${dependent.id}|${dependentTarget}|in`
13529
+ ),
13530
+ toTotalConnections: connectionTotals.get(
13531
+ `${dependent.id}|${dependentTarget}|in`
13532
+ ) || 1
13419
13533
  }
13420
13534
  )
13421
13535
  },
@@ -13502,7 +13616,17 @@ const TaskGanttContentInner = (props) => {
13502
13616
  taskHeight,
13503
13617
  isCritical,
13504
13618
  rtl,
13505
- onArrowDoubleClick
13619
+ onArrowDoubleClick,
13620
+ fromConnectionIndex: getConnectionIndex(
13621
+ `${source.id}|${sourceTarget}|out`
13622
+ ),
13623
+ fromTotalConnections: connectionTotals.get(
13624
+ `${source.id}|${sourceTarget}|out`
13625
+ ) || 1,
13626
+ toConnectionIndex: getConnectionIndex(
13627
+ `${taskId}|${ownTarget}|in`
13628
+ ),
13629
+ toTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|in`) || 1
13506
13630
  }
13507
13631
  )
13508
13632
  },
@@ -11744,9 +11744,9 @@
11744
11744
  ${x - width},${y - width}
11745
11745
  ${x - width},${y + width}`;
11746
11746
  };
11747
- const arrow_clickable = "_arrow_clickable_3bsl2_1";
11748
- const mainPath = "_mainPath_3bsl2_11";
11749
- const clickZone = "_clickZone_3bsl2_43";
11747
+ const arrow_clickable = "_arrow_clickable_m4fqb_1";
11748
+ const mainPath = "_mainPath_m4fqb_11";
11749
+ const clickZone = "_clickZone_m4fqb_57";
11750
11750
  const styles$a = {
11751
11751
  arrow_clickable,
11752
11752
  mainPath,
@@ -11769,7 +11769,11 @@
11769
11769
  taskHeight,
11770
11770
  isCritical,
11771
11771
  rtl,
11772
- onArrowDoubleClick = void 0
11772
+ onArrowDoubleClick = void 0,
11773
+ fromConnectionIndex = 0,
11774
+ fromTotalConnections = 1,
11775
+ toConnectionIndex = 0,
11776
+ toTotalConnections = 1
11773
11777
  } = props;
11774
11778
  const indexFrom = React.useMemo(
11775
11779
  () => Math.floor(fromY / fullRowHeight),
@@ -11798,7 +11802,11 @@
11798
11802
  targetTo === "startOfTask" !== rtl,
11799
11803
  fullRowHeight,
11800
11804
  taskHeight,
11801
- arrowIndent
11805
+ arrowIndent,
11806
+ fromConnectionIndex,
11807
+ fromTotalConnections,
11808
+ toConnectionIndex,
11809
+ toTotalConnections
11802
11810
  ),
11803
11811
  [
11804
11812
  indexFrom,
@@ -11814,7 +11822,11 @@
11814
11822
  rtl,
11815
11823
  fullRowHeight,
11816
11824
  taskHeight,
11817
- arrowIndent
11825
+ arrowIndent,
11826
+ fromConnectionIndex,
11827
+ fromTotalConnections,
11828
+ toConnectionIndex,
11829
+ toTotalConnections
11818
11830
  ]
11819
11831
  );
11820
11832
  const color = React.useMemo(() => {
@@ -11838,19 +11850,76 @@
11838
11850
  ) });
11839
11851
  };
11840
11852
  const Arrow = React.memo(ArrowInner);
11841
- const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSide, indexTo, toX1, toX2, toY, isTaskToLeftSide, fullRowHeight, taskHeight, arrowIndent) => {
11853
+ const roundedPath = (points, radius) => {
11854
+ if (points.length < 2)
11855
+ return "";
11856
+ let d = `M ${points[0][0]} ${points[0][1]}`;
11857
+ for (let i = 1; i < points.length - 1; i++) {
11858
+ const prev = points[i - 1];
11859
+ const curr = points[i];
11860
+ const next = points[i + 1];
11861
+ const dx1 = prev[0] - curr[0];
11862
+ const dy1 = prev[1] - curr[1];
11863
+ const len1 = Math.abs(dx1) + Math.abs(dy1);
11864
+ const dx2 = next[0] - curr[0];
11865
+ const dy2 = next[1] - curr[1];
11866
+ const len2 = Math.abs(dx2) + Math.abs(dy2);
11867
+ const r = Math.min(radius, len1 / 2, len2 / 2);
11868
+ if (r <= 0 || len1 === 0 || len2 === 0) {
11869
+ d += ` L ${curr[0]} ${curr[1]}`;
11870
+ continue;
11871
+ }
11872
+ const ux1 = dx1 === 0 ? 0 : dx1 / Math.abs(dx1);
11873
+ const uy1 = dy1 === 0 ? 0 : dy1 / Math.abs(dy1);
11874
+ const ux2 = dx2 === 0 ? 0 : dx2 / Math.abs(dx2);
11875
+ const uy2 = dy2 === 0 ? 0 : dy2 / Math.abs(dy2);
11876
+ d += ` L ${curr[0] + ux1 * r} ${curr[1] + uy1 * r}`;
11877
+ d += ` Q ${curr[0]} ${curr[1]} ${curr[0] + ux2 * r} ${curr[1] + uy2 * r}`;
11878
+ }
11879
+ const last = points[points.length - 1];
11880
+ d += ` L ${last[0]} ${last[1]}`;
11881
+ return d;
11882
+ };
11883
+ const ARROW_CORNER_RADIUS = 8;
11884
+ const MAX_EXTRA_INDENT = 20;
11885
+ const CONNECTION_SPREAD_RATIO = 0.35;
11886
+ const MAX_CORRIDOR_SPREAD = 20;
11887
+ const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSide, indexTo, toX1, toX2, toY, isTaskToLeftSide, fullRowHeight, taskHeight, arrowIndent, fromConnectionIndex, fromTotalConnections, toConnectionIndex, toTotalConnections) => {
11842
11888
  const isDownDirected = indexTo > indexForm;
11843
- const horizontalDockingY = isDownDirected ? (indexForm + 1) * fullRowHeight : indexForm * fullRowHeight;
11844
- const taskFromEndPositionX = isTaskFromLeftSide ? fromX1 - arrowIndent : fromX2 + arrowIndent;
11845
- const taskToEndPositionX = isTaskToLeftSide ? toX1 - arrowIndent : toX2 + arrowIndent;
11846
- const taskToEndPositionY = toY + taskHeight / 2;
11847
- const path = `M ${isTaskFromLeftSide ? fromX1 : fromX2} ${fromY + taskHeight / 2}
11848
- H ${taskFromEndPositionX}
11849
- V ${horizontalDockingY}
11850
- H ${taskToEndPositionX}
11851
- V ${taskToEndPositionY}
11852
- H ${isTaskToLeftSide ? toX1 : toX2}`;
11853
- const trianglePoints = isTaskToLeftSide ? generateTrianglePoints(toX1, taskToEndPositionY, 5, false) : generateTrianglePoints(toX2, taskToEndPositionY, 5, true);
11889
+ const fromVertOffset = fromTotalConnections <= 1 ? 0 : (fromConnectionIndex / (fromTotalConnections - 1) - 0.5) * taskHeight * CONNECTION_SPREAD_RATIO;
11890
+ const toVertOffset = toTotalConnections <= 1 ? 0 : (toConnectionIndex / (toTotalConnections - 1) - 0.5) * taskHeight * CONNECTION_SPREAD_RATIO;
11891
+ const fromIndentSpacing = fromTotalConnections <= 1 ? 0 : MAX_EXTRA_INDENT / (fromTotalConnections - 1);
11892
+ const toIndentSpacing = toTotalConnections <= 1 ? 0 : MAX_EXTRA_INDENT / (toTotalConnections - 1);
11893
+ const fromIndent = arrowIndent + fromConnectionIndex * fromIndentSpacing;
11894
+ const toIndent = arrowIndent + toConnectionIndex * toIndentSpacing;
11895
+ const corridorHash = (fromConnectionIndex * 7 + toConnectionIndex * 13) % 11 / 10;
11896
+ const corridorSpread = Math.min(fullRowHeight * 0.35, MAX_CORRIDOR_SPREAD);
11897
+ const corridorOffset = (corridorHash - 0.5) * corridorSpread;
11898
+ const horizontalDockingY = isDownDirected ? (indexForm + 1) * fullRowHeight + corridorOffset : indexForm * fullRowHeight + corridorOffset;
11899
+ const taskFromEndPositionX = isTaskFromLeftSide ? fromX1 - fromIndent : fromX2 + fromIndent;
11900
+ const taskToEndPositionX = isTaskToLeftSide ? toX1 - toIndent : toX2 + toIndent;
11901
+ const startX = isTaskFromLeftSide ? fromX1 : fromX2;
11902
+ const startY = fromY + taskHeight / 2 + fromVertOffset;
11903
+ const endX = isTaskToLeftSide ? toX1 : toX2;
11904
+ const endY = toY + taskHeight / 2 + toVertOffset;
11905
+ const rawWaypoints = [
11906
+ [startX, startY],
11907
+ [taskFromEndPositionX, startY],
11908
+ [taskFromEndPositionX, horizontalDockingY],
11909
+ [taskToEndPositionX, horizontalDockingY],
11910
+ [taskToEndPositionX, endY],
11911
+ [endX, endY]
11912
+ ];
11913
+ const waypoints = [rawWaypoints[0]];
11914
+ for (let i = 1; i < rawWaypoints.length; i++) {
11915
+ const prev = waypoints[waypoints.length - 1];
11916
+ const curr = rawWaypoints[i];
11917
+ if (Math.abs(curr[0] - prev[0]) > 0.5 || Math.abs(curr[1] - prev[1]) > 0.5) {
11918
+ waypoints.push(curr);
11919
+ }
11920
+ }
11921
+ const path = roundedPath(waypoints, ARROW_CORNER_RADIUS);
11922
+ const trianglePoints = isTaskToLeftSide ? generateTrianglePoints(toX1, endY, 5, false) : generateTrianglePoints(toX2, endY, 5, true);
11854
11923
  return [path, trianglePoints];
11855
11924
  };
11856
11925
  const relationLine = "_relationLine_wh2qy_1";
@@ -13149,6 +13218,31 @@
13149
13218
  taskById.set(task.id, task);
13150
13219
  }
13151
13220
  });
13221
+ const connectionTotals = /* @__PURE__ */ new Map();
13222
+ for (const [, dependenciesByLevel] of dependencyMap) {
13223
+ for (const [taskId, dependencies] of dependenciesByLevel) {
13224
+ for (const dep of dependencies) {
13225
+ if (!visibleTasksMirror[dep.source.id])
13226
+ continue;
13227
+ const sourceKey = `${dep.source.id}|${dep.sourceTarget}|out`;
13228
+ connectionTotals.set(
13229
+ sourceKey,
13230
+ (connectionTotals.get(sourceKey) || 0) + 1
13231
+ );
13232
+ const targetKey = `${taskId}|${dep.ownTarget}|in`;
13233
+ connectionTotals.set(
13234
+ targetKey,
13235
+ (connectionTotals.get(targetKey) || 0) + 1
13236
+ );
13237
+ }
13238
+ }
13239
+ }
13240
+ const connectionIndices = /* @__PURE__ */ new Map();
13241
+ const getConnectionIndex = (key2) => {
13242
+ const idx = connectionIndices.get(key2) || 0;
13243
+ connectionIndices.set(key2, idx + 1);
13244
+ return idx;
13245
+ };
13152
13246
  const addedSelectedTasks = {};
13153
13247
  const addedDependencies = {};
13154
13248
  for (let index2 = start; index2 <= end; ++index2) {
@@ -13358,7 +13452,17 @@
13358
13452
  taskHeight,
13359
13453
  isCritical: isCritical2,
13360
13454
  rtl,
13361
- onArrowDoubleClick
13455
+ onArrowDoubleClick,
13456
+ fromConnectionIndex: getConnectionIndex(
13457
+ `${source.id}|${sourceTarget}|out`
13458
+ ),
13459
+ fromTotalConnections: connectionTotals.get(
13460
+ `${source.id}|${sourceTarget}|out`
13461
+ ) || 1,
13462
+ toConnectionIndex: getConnectionIndex(
13463
+ `${taskId}|${ownTarget}|in`
13464
+ ),
13465
+ toTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|in`) || 1
13362
13466
  }
13363
13467
  )
13364
13468
  },
@@ -13432,7 +13536,17 @@
13432
13536
  taskHeight,
13433
13537
  isCritical: isCritical2,
13434
13538
  rtl,
13435
- onArrowDoubleClick
13539
+ onArrowDoubleClick,
13540
+ fromConnectionIndex: getConnectionIndex(
13541
+ `${taskId}|${ownTarget}|out`
13542
+ ),
13543
+ fromTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|out`) || 1,
13544
+ toConnectionIndex: getConnectionIndex(
13545
+ `${dependent.id}|${dependentTarget}|in`
13546
+ ),
13547
+ toTotalConnections: connectionTotals.get(
13548
+ `${dependent.id}|${dependentTarget}|in`
13549
+ ) || 1
13436
13550
  }
13437
13551
  )
13438
13552
  },
@@ -13519,7 +13633,17 @@
13519
13633
  taskHeight,
13520
13634
  isCritical,
13521
13635
  rtl,
13522
- onArrowDoubleClick
13636
+ onArrowDoubleClick,
13637
+ fromConnectionIndex: getConnectionIndex(
13638
+ `${source.id}|${sourceTarget}|out`
13639
+ ),
13640
+ fromTotalConnections: connectionTotals.get(
13641
+ `${source.id}|${sourceTarget}|out`
13642
+ ) || 1,
13643
+ toConnectionIndex: getConnectionIndex(
13644
+ `${taskId}|${ownTarget}|in`
13645
+ ),
13646
+ toTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|in`) || 1
13523
13647
  }
13524
13648
  )
13525
13649
  },
package/dist/style.css CHANGED
@@ -439,31 +439,38 @@
439
439
  ._calendarDragging_15t8b_85 {
440
440
  cursor: ew-resize;
441
441
  }
442
- ._arrow_clickable_3bsl2_1 {
442
+ ._arrow_clickable_m4fqb_1 {
443
443
  cursor: pointer;
444
444
  }
445
445
 
446
446
  /*noinspection CssUnresolvedCustomProperty*/
447
- ._arrow_clickable_3bsl2_1:hover ._mainPath_3bsl2_11 {
447
+ ._arrow_clickable_m4fqb_1:hover ._mainPath_m4fqb_11 {
448
448
  filter: var(--gantt-hover-filter);
449
449
  stroke: var(--gantt-arrow-hover-color, red);
450
- stroke-width: 3px;
450
+ stroke-width: 2.5px;
451
+ opacity: 1;
451
452
  }
452
453
 
453
454
  /*noinspection CssUnresolvedCustomProperty*/
454
- ._arrow_clickable_3bsl2_1:hover polygon {
455
+ ._arrow_clickable_m4fqb_1:hover polygon {
455
456
  fill: var(--gantt-arrow-hover-color, red);
456
457
  }
457
458
 
458
- ._mainPath_3bsl2_11 {
459
+ ._mainPath_m4fqb_11 {
459
460
  fill: none;
460
- stroke-width: 2px;
461
+ stroke-width: 1.4px;
462
+ stroke-linecap: round;
463
+ stroke-linejoin: round;
464
+ opacity: 0.7;
465
+ transition:
466
+ stroke-width 0.15s ease,
467
+ opacity 0.15s ease;
461
468
  }
462
469
 
463
- ._clickZone_3bsl2_43 {
470
+ ._clickZone_m4fqb_57 {
464
471
  fill: none;
465
472
  stroke: transparent;
466
- stroke-width: 8px;
473
+ stroke-width: 10px;
467
474
  }
468
475
  ._relationLine_wh2qy_1 {
469
476
  /*noinspection CssUnresolvedCustomProperty*/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gantt-task-react-v",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
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",