gantt-task-react-v 1.4.2 → 1.4.4
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/components/other/arrow.d.ts +4 -0
- package/dist/gantt-task-react.es.js +123 -25
- package/dist/gantt-task-react.umd.js +123 -25
- package/dist/style.css +13 -9
- package/package.json +1 -1
|
@@ -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 = "
|
|
11731
|
-
const mainPath = "
|
|
11732
|
-
const clickZone = "
|
|
11730
|
+
const arrow_clickable = "_arrow_clickable_w0fo0_1";
|
|
11731
|
+
const mainPath = "_mainPath_w0fo0_11";
|
|
11732
|
+
const clickZone = "_clickZone_w0fo0_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(() => {
|
|
@@ -11851,31 +11863,62 @@ const roundedPath = (points, radius) => {
|
|
|
11851
11863
|
d += ` L ${last[0]} ${last[1]}`;
|
|
11852
11864
|
return d;
|
|
11853
11865
|
};
|
|
11854
|
-
const ARROW_CORNER_RADIUS =
|
|
11855
|
-
const
|
|
11866
|
+
const ARROW_CORNER_RADIUS = 5;
|
|
11867
|
+
const connectionPosition = (index2, total) => {
|
|
11868
|
+
if (total <= 1)
|
|
11869
|
+
return 0.5;
|
|
11870
|
+
return index2 / (total - 1);
|
|
11871
|
+
};
|
|
11872
|
+
const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSide, indexTo, toX1, toX2, toY, isTaskToLeftSide, fullRowHeight, taskHeight, arrowIndent, fromConnectionIndex, fromTotalConnections, toConnectionIndex, toTotalConnections) => {
|
|
11856
11873
|
const isDownDirected = indexTo > indexForm;
|
|
11857
|
-
const
|
|
11858
|
-
|
|
11859
|
-
);
|
|
11860
|
-
const
|
|
11861
|
-
const
|
|
11862
|
-
const
|
|
11863
|
-
const taskFromEndPositionX = isTaskFromLeftSide ? fromX1 - arrowIndent : fromX2 + arrowIndent;
|
|
11864
|
-
const taskToEndPositionX = isTaskToLeftSide ? toX1 - arrowIndent : toX2 + arrowIndent;
|
|
11865
|
-
const taskToEndPositionY = toY + taskHeight / 2;
|
|
11874
|
+
const isSameRow = indexForm === indexTo;
|
|
11875
|
+
const vertSpreadRange = taskHeight * 0.8;
|
|
11876
|
+
const fromPos = connectionPosition(fromConnectionIndex, fromTotalConnections);
|
|
11877
|
+
const toPos = connectionPosition(toConnectionIndex, toTotalConnections);
|
|
11878
|
+
const fromVertOffset = (fromPos - 0.5) * vertSpreadRange;
|
|
11879
|
+
const toVertOffset = (toPos - 0.5) * vertSpreadRange;
|
|
11866
11880
|
const startX = isTaskFromLeftSide ? fromX1 : fromX2;
|
|
11867
|
-
const startY = fromY + taskHeight / 2;
|
|
11881
|
+
const startY = fromY + taskHeight / 2 + fromVertOffset;
|
|
11868
11882
|
const endX = isTaskToLeftSide ? toX1 : toX2;
|
|
11869
|
-
const
|
|
11883
|
+
const endY = toY + taskHeight / 2 + toVertOffset;
|
|
11884
|
+
const fromIndent = arrowIndent + fromConnectionIndex * 8;
|
|
11885
|
+
const toIndent = arrowIndent + toConnectionIndex * 8;
|
|
11886
|
+
const taskFromEndPositionX = isTaskFromLeftSide ? fromX1 - fromIndent : fromX2 + fromIndent;
|
|
11887
|
+
const taskToEndPositionX = isTaskToLeftSide ? toX1 - toIndent : toX2 + toIndent;
|
|
11888
|
+
const totalArrowsInCorridor = Math.max(
|
|
11889
|
+
fromTotalConnections,
|
|
11890
|
+
toTotalConnections,
|
|
11891
|
+
1
|
|
11892
|
+
);
|
|
11893
|
+
const corridorIndex = (fromConnectionIndex + toConnectionIndex) % Math.max(totalArrowsInCorridor, 1);
|
|
11894
|
+
const corridorPos = connectionPosition(corridorIndex, totalArrowsInCorridor);
|
|
11895
|
+
const corridorRange = fullRowHeight * 0.7;
|
|
11896
|
+
const corridorBase = isDownDirected ? (indexForm + 1) * fullRowHeight - corridorRange * 0.15 : indexForm * fullRowHeight + corridorRange * 0.15;
|
|
11897
|
+
const corridorOffset = (corridorPos - 0.5) * corridorRange;
|
|
11898
|
+
let horizontalDockingY;
|
|
11899
|
+
if (isSameRow) {
|
|
11900
|
+
horizontalDockingY = isTaskFromLeftSide ? fromY + taskHeight + 6 + fromConnectionIndex * 4 : fromY - 6 - fromConnectionIndex * 4;
|
|
11901
|
+
} else {
|
|
11902
|
+
horizontalDockingY = corridorBase + corridorOffset;
|
|
11903
|
+
}
|
|
11904
|
+
const rawWaypoints = [
|
|
11870
11905
|
[startX, startY],
|
|
11871
11906
|
[taskFromEndPositionX, startY],
|
|
11872
11907
|
[taskFromEndPositionX, horizontalDockingY],
|
|
11873
11908
|
[taskToEndPositionX, horizontalDockingY],
|
|
11874
|
-
[taskToEndPositionX,
|
|
11875
|
-
[endX,
|
|
11909
|
+
[taskToEndPositionX, endY],
|
|
11910
|
+
[endX, endY]
|
|
11876
11911
|
];
|
|
11912
|
+
const waypoints = [rawWaypoints[0]];
|
|
11913
|
+
for (let i = 1; i < rawWaypoints.length; i++) {
|
|
11914
|
+
const prev = waypoints[waypoints.length - 1];
|
|
11915
|
+
const curr = rawWaypoints[i];
|
|
11916
|
+
if (Math.abs(curr[0] - prev[0]) > 0.5 || Math.abs(curr[1] - prev[1]) > 0.5) {
|
|
11917
|
+
waypoints.push(curr);
|
|
11918
|
+
}
|
|
11919
|
+
}
|
|
11877
11920
|
const path = roundedPath(waypoints, ARROW_CORNER_RADIUS);
|
|
11878
|
-
const trianglePoints = isTaskToLeftSide ? generateTrianglePoints(toX1,
|
|
11921
|
+
const trianglePoints = isTaskToLeftSide ? generateTrianglePoints(toX1, endY, 5, false) : generateTrianglePoints(toX2, endY, 5, true);
|
|
11879
11922
|
return [path, trianglePoints];
|
|
11880
11923
|
};
|
|
11881
11924
|
const relationLine = "_relationLine_wh2qy_1";
|
|
@@ -13174,6 +13217,31 @@ const TaskGanttContentInner = (props) => {
|
|
|
13174
13217
|
taskById.set(task.id, task);
|
|
13175
13218
|
}
|
|
13176
13219
|
});
|
|
13220
|
+
const connectionTotals = /* @__PURE__ */ new Map();
|
|
13221
|
+
for (const [, dependenciesByLevel] of dependencyMap) {
|
|
13222
|
+
for (const [taskId, dependencies] of dependenciesByLevel) {
|
|
13223
|
+
for (const dep of dependencies) {
|
|
13224
|
+
if (!visibleTasksMirror[dep.source.id])
|
|
13225
|
+
continue;
|
|
13226
|
+
const sourceKey = `${dep.source.id}|${dep.sourceTarget}|out`;
|
|
13227
|
+
connectionTotals.set(
|
|
13228
|
+
sourceKey,
|
|
13229
|
+
(connectionTotals.get(sourceKey) || 0) + 1
|
|
13230
|
+
);
|
|
13231
|
+
const targetKey = `${taskId}|${dep.ownTarget}|in`;
|
|
13232
|
+
connectionTotals.set(
|
|
13233
|
+
targetKey,
|
|
13234
|
+
(connectionTotals.get(targetKey) || 0) + 1
|
|
13235
|
+
);
|
|
13236
|
+
}
|
|
13237
|
+
}
|
|
13238
|
+
}
|
|
13239
|
+
const connectionIndices = /* @__PURE__ */ new Map();
|
|
13240
|
+
const getConnectionIndex = (key2) => {
|
|
13241
|
+
const idx = connectionIndices.get(key2) || 0;
|
|
13242
|
+
connectionIndices.set(key2, idx + 1);
|
|
13243
|
+
return idx;
|
|
13244
|
+
};
|
|
13177
13245
|
const addedSelectedTasks = {};
|
|
13178
13246
|
const addedDependencies = {};
|
|
13179
13247
|
for (let index2 = start; index2 <= end; ++index2) {
|
|
@@ -13383,7 +13451,17 @@ const TaskGanttContentInner = (props) => {
|
|
|
13383
13451
|
taskHeight,
|
|
13384
13452
|
isCritical: isCritical2,
|
|
13385
13453
|
rtl,
|
|
13386
|
-
onArrowDoubleClick
|
|
13454
|
+
onArrowDoubleClick,
|
|
13455
|
+
fromConnectionIndex: getConnectionIndex(
|
|
13456
|
+
`${source.id}|${sourceTarget}|out`
|
|
13457
|
+
),
|
|
13458
|
+
fromTotalConnections: connectionTotals.get(
|
|
13459
|
+
`${source.id}|${sourceTarget}|out`
|
|
13460
|
+
) || 1,
|
|
13461
|
+
toConnectionIndex: getConnectionIndex(
|
|
13462
|
+
`${taskId}|${ownTarget}|in`
|
|
13463
|
+
),
|
|
13464
|
+
toTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|in`) || 1
|
|
13387
13465
|
}
|
|
13388
13466
|
)
|
|
13389
13467
|
},
|
|
@@ -13457,7 +13535,17 @@ const TaskGanttContentInner = (props) => {
|
|
|
13457
13535
|
taskHeight,
|
|
13458
13536
|
isCritical: isCritical2,
|
|
13459
13537
|
rtl,
|
|
13460
|
-
onArrowDoubleClick
|
|
13538
|
+
onArrowDoubleClick,
|
|
13539
|
+
fromConnectionIndex: getConnectionIndex(
|
|
13540
|
+
`${taskId}|${ownTarget}|out`
|
|
13541
|
+
),
|
|
13542
|
+
fromTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|out`) || 1,
|
|
13543
|
+
toConnectionIndex: getConnectionIndex(
|
|
13544
|
+
`${dependent.id}|${dependentTarget}|in`
|
|
13545
|
+
),
|
|
13546
|
+
toTotalConnections: connectionTotals.get(
|
|
13547
|
+
`${dependent.id}|${dependentTarget}|in`
|
|
13548
|
+
) || 1
|
|
13461
13549
|
}
|
|
13462
13550
|
)
|
|
13463
13551
|
},
|
|
@@ -13544,7 +13632,17 @@ const TaskGanttContentInner = (props) => {
|
|
|
13544
13632
|
taskHeight,
|
|
13545
13633
|
isCritical,
|
|
13546
13634
|
rtl,
|
|
13547
|
-
onArrowDoubleClick
|
|
13635
|
+
onArrowDoubleClick,
|
|
13636
|
+
fromConnectionIndex: getConnectionIndex(
|
|
13637
|
+
`${source.id}|${sourceTarget}|out`
|
|
13638
|
+
),
|
|
13639
|
+
fromTotalConnections: connectionTotals.get(
|
|
13640
|
+
`${source.id}|${sourceTarget}|out`
|
|
13641
|
+
) || 1,
|
|
13642
|
+
toConnectionIndex: getConnectionIndex(
|
|
13643
|
+
`${taskId}|${ownTarget}|in`
|
|
13644
|
+
),
|
|
13645
|
+
toTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|in`) || 1
|
|
13548
13646
|
}
|
|
13549
13647
|
)
|
|
13550
13648
|
},
|
|
@@ -11744,9 +11744,9 @@
|
|
|
11744
11744
|
${x - width},${y - width}
|
|
11745
11745
|
${x - width},${y + width}`;
|
|
11746
11746
|
};
|
|
11747
|
-
const arrow_clickable = "
|
|
11748
|
-
const mainPath = "
|
|
11749
|
-
const clickZone = "
|
|
11747
|
+
const arrow_clickable = "_arrow_clickable_w0fo0_1";
|
|
11748
|
+
const mainPath = "_mainPath_w0fo0_11";
|
|
11749
|
+
const clickZone = "_clickZone_w0fo0_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(() => {
|
|
@@ -11868,31 +11880,62 @@
|
|
|
11868
11880
|
d += ` L ${last[0]} ${last[1]}`;
|
|
11869
11881
|
return d;
|
|
11870
11882
|
};
|
|
11871
|
-
const ARROW_CORNER_RADIUS =
|
|
11872
|
-
const
|
|
11883
|
+
const ARROW_CORNER_RADIUS = 5;
|
|
11884
|
+
const connectionPosition = (index2, total) => {
|
|
11885
|
+
if (total <= 1)
|
|
11886
|
+
return 0.5;
|
|
11887
|
+
return index2 / (total - 1);
|
|
11888
|
+
};
|
|
11889
|
+
const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSide, indexTo, toX1, toX2, toY, isTaskToLeftSide, fullRowHeight, taskHeight, arrowIndent, fromConnectionIndex, fromTotalConnections, toConnectionIndex, toTotalConnections) => {
|
|
11873
11890
|
const isDownDirected = indexTo > indexForm;
|
|
11874
|
-
const
|
|
11875
|
-
|
|
11876
|
-
);
|
|
11877
|
-
const
|
|
11878
|
-
const
|
|
11879
|
-
const
|
|
11880
|
-
const taskFromEndPositionX = isTaskFromLeftSide ? fromX1 - arrowIndent : fromX2 + arrowIndent;
|
|
11881
|
-
const taskToEndPositionX = isTaskToLeftSide ? toX1 - arrowIndent : toX2 + arrowIndent;
|
|
11882
|
-
const taskToEndPositionY = toY + taskHeight / 2;
|
|
11891
|
+
const isSameRow = indexForm === indexTo;
|
|
11892
|
+
const vertSpreadRange = taskHeight * 0.8;
|
|
11893
|
+
const fromPos = connectionPosition(fromConnectionIndex, fromTotalConnections);
|
|
11894
|
+
const toPos = connectionPosition(toConnectionIndex, toTotalConnections);
|
|
11895
|
+
const fromVertOffset = (fromPos - 0.5) * vertSpreadRange;
|
|
11896
|
+
const toVertOffset = (toPos - 0.5) * vertSpreadRange;
|
|
11883
11897
|
const startX = isTaskFromLeftSide ? fromX1 : fromX2;
|
|
11884
|
-
const startY = fromY + taskHeight / 2;
|
|
11898
|
+
const startY = fromY + taskHeight / 2 + fromVertOffset;
|
|
11885
11899
|
const endX = isTaskToLeftSide ? toX1 : toX2;
|
|
11886
|
-
const
|
|
11900
|
+
const endY = toY + taskHeight / 2 + toVertOffset;
|
|
11901
|
+
const fromIndent = arrowIndent + fromConnectionIndex * 8;
|
|
11902
|
+
const toIndent = arrowIndent + toConnectionIndex * 8;
|
|
11903
|
+
const taskFromEndPositionX = isTaskFromLeftSide ? fromX1 - fromIndent : fromX2 + fromIndent;
|
|
11904
|
+
const taskToEndPositionX = isTaskToLeftSide ? toX1 - toIndent : toX2 + toIndent;
|
|
11905
|
+
const totalArrowsInCorridor = Math.max(
|
|
11906
|
+
fromTotalConnections,
|
|
11907
|
+
toTotalConnections,
|
|
11908
|
+
1
|
|
11909
|
+
);
|
|
11910
|
+
const corridorIndex = (fromConnectionIndex + toConnectionIndex) % Math.max(totalArrowsInCorridor, 1);
|
|
11911
|
+
const corridorPos = connectionPosition(corridorIndex, totalArrowsInCorridor);
|
|
11912
|
+
const corridorRange = fullRowHeight * 0.7;
|
|
11913
|
+
const corridorBase = isDownDirected ? (indexForm + 1) * fullRowHeight - corridorRange * 0.15 : indexForm * fullRowHeight + corridorRange * 0.15;
|
|
11914
|
+
const corridorOffset = (corridorPos - 0.5) * corridorRange;
|
|
11915
|
+
let horizontalDockingY;
|
|
11916
|
+
if (isSameRow) {
|
|
11917
|
+
horizontalDockingY = isTaskFromLeftSide ? fromY + taskHeight + 6 + fromConnectionIndex * 4 : fromY - 6 - fromConnectionIndex * 4;
|
|
11918
|
+
} else {
|
|
11919
|
+
horizontalDockingY = corridorBase + corridorOffset;
|
|
11920
|
+
}
|
|
11921
|
+
const rawWaypoints = [
|
|
11887
11922
|
[startX, startY],
|
|
11888
11923
|
[taskFromEndPositionX, startY],
|
|
11889
11924
|
[taskFromEndPositionX, horizontalDockingY],
|
|
11890
11925
|
[taskToEndPositionX, horizontalDockingY],
|
|
11891
|
-
[taskToEndPositionX,
|
|
11892
|
-
[endX,
|
|
11926
|
+
[taskToEndPositionX, endY],
|
|
11927
|
+
[endX, endY]
|
|
11893
11928
|
];
|
|
11929
|
+
const waypoints = [rawWaypoints[0]];
|
|
11930
|
+
for (let i = 1; i < rawWaypoints.length; i++) {
|
|
11931
|
+
const prev = waypoints[waypoints.length - 1];
|
|
11932
|
+
const curr = rawWaypoints[i];
|
|
11933
|
+
if (Math.abs(curr[0] - prev[0]) > 0.5 || Math.abs(curr[1] - prev[1]) > 0.5) {
|
|
11934
|
+
waypoints.push(curr);
|
|
11935
|
+
}
|
|
11936
|
+
}
|
|
11894
11937
|
const path = roundedPath(waypoints, ARROW_CORNER_RADIUS);
|
|
11895
|
-
const trianglePoints = isTaskToLeftSide ? generateTrianglePoints(toX1,
|
|
11938
|
+
const trianglePoints = isTaskToLeftSide ? generateTrianglePoints(toX1, endY, 5, false) : generateTrianglePoints(toX2, endY, 5, true);
|
|
11896
11939
|
return [path, trianglePoints];
|
|
11897
11940
|
};
|
|
11898
11941
|
const relationLine = "_relationLine_wh2qy_1";
|
|
@@ -13191,6 +13234,31 @@
|
|
|
13191
13234
|
taskById.set(task.id, task);
|
|
13192
13235
|
}
|
|
13193
13236
|
});
|
|
13237
|
+
const connectionTotals = /* @__PURE__ */ new Map();
|
|
13238
|
+
for (const [, dependenciesByLevel] of dependencyMap) {
|
|
13239
|
+
for (const [taskId, dependencies] of dependenciesByLevel) {
|
|
13240
|
+
for (const dep of dependencies) {
|
|
13241
|
+
if (!visibleTasksMirror[dep.source.id])
|
|
13242
|
+
continue;
|
|
13243
|
+
const sourceKey = `${dep.source.id}|${dep.sourceTarget}|out`;
|
|
13244
|
+
connectionTotals.set(
|
|
13245
|
+
sourceKey,
|
|
13246
|
+
(connectionTotals.get(sourceKey) || 0) + 1
|
|
13247
|
+
);
|
|
13248
|
+
const targetKey = `${taskId}|${dep.ownTarget}|in`;
|
|
13249
|
+
connectionTotals.set(
|
|
13250
|
+
targetKey,
|
|
13251
|
+
(connectionTotals.get(targetKey) || 0) + 1
|
|
13252
|
+
);
|
|
13253
|
+
}
|
|
13254
|
+
}
|
|
13255
|
+
}
|
|
13256
|
+
const connectionIndices = /* @__PURE__ */ new Map();
|
|
13257
|
+
const getConnectionIndex = (key2) => {
|
|
13258
|
+
const idx = connectionIndices.get(key2) || 0;
|
|
13259
|
+
connectionIndices.set(key2, idx + 1);
|
|
13260
|
+
return idx;
|
|
13261
|
+
};
|
|
13194
13262
|
const addedSelectedTasks = {};
|
|
13195
13263
|
const addedDependencies = {};
|
|
13196
13264
|
for (let index2 = start; index2 <= end; ++index2) {
|
|
@@ -13400,7 +13468,17 @@
|
|
|
13400
13468
|
taskHeight,
|
|
13401
13469
|
isCritical: isCritical2,
|
|
13402
13470
|
rtl,
|
|
13403
|
-
onArrowDoubleClick
|
|
13471
|
+
onArrowDoubleClick,
|
|
13472
|
+
fromConnectionIndex: getConnectionIndex(
|
|
13473
|
+
`${source.id}|${sourceTarget}|out`
|
|
13474
|
+
),
|
|
13475
|
+
fromTotalConnections: connectionTotals.get(
|
|
13476
|
+
`${source.id}|${sourceTarget}|out`
|
|
13477
|
+
) || 1,
|
|
13478
|
+
toConnectionIndex: getConnectionIndex(
|
|
13479
|
+
`${taskId}|${ownTarget}|in`
|
|
13480
|
+
),
|
|
13481
|
+
toTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|in`) || 1
|
|
13404
13482
|
}
|
|
13405
13483
|
)
|
|
13406
13484
|
},
|
|
@@ -13474,7 +13552,17 @@
|
|
|
13474
13552
|
taskHeight,
|
|
13475
13553
|
isCritical: isCritical2,
|
|
13476
13554
|
rtl,
|
|
13477
|
-
onArrowDoubleClick
|
|
13555
|
+
onArrowDoubleClick,
|
|
13556
|
+
fromConnectionIndex: getConnectionIndex(
|
|
13557
|
+
`${taskId}|${ownTarget}|out`
|
|
13558
|
+
),
|
|
13559
|
+
fromTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|out`) || 1,
|
|
13560
|
+
toConnectionIndex: getConnectionIndex(
|
|
13561
|
+
`${dependent.id}|${dependentTarget}|in`
|
|
13562
|
+
),
|
|
13563
|
+
toTotalConnections: connectionTotals.get(
|
|
13564
|
+
`${dependent.id}|${dependentTarget}|in`
|
|
13565
|
+
) || 1
|
|
13478
13566
|
}
|
|
13479
13567
|
)
|
|
13480
13568
|
},
|
|
@@ -13561,7 +13649,17 @@
|
|
|
13561
13649
|
taskHeight,
|
|
13562
13650
|
isCritical,
|
|
13563
13651
|
rtl,
|
|
13564
|
-
onArrowDoubleClick
|
|
13652
|
+
onArrowDoubleClick,
|
|
13653
|
+
fromConnectionIndex: getConnectionIndex(
|
|
13654
|
+
`${source.id}|${sourceTarget}|out`
|
|
13655
|
+
),
|
|
13656
|
+
fromTotalConnections: connectionTotals.get(
|
|
13657
|
+
`${source.id}|${sourceTarget}|out`
|
|
13658
|
+
) || 1,
|
|
13659
|
+
toConnectionIndex: getConnectionIndex(
|
|
13660
|
+
`${taskId}|${ownTarget}|in`
|
|
13661
|
+
),
|
|
13662
|
+
toTotalConnections: connectionTotals.get(`${taskId}|${ownTarget}|in`) || 1
|
|
13565
13663
|
}
|
|
13566
13664
|
)
|
|
13567
13665
|
},
|
package/dist/style.css
CHANGED
|
@@ -439,34 +439,38 @@
|
|
|
439
439
|
._calendarDragging_15t8b_85 {
|
|
440
440
|
cursor: ew-resize;
|
|
441
441
|
}
|
|
442
|
-
.
|
|
442
|
+
._arrow_clickable_w0fo0_1 {
|
|
443
443
|
cursor: pointer;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
447
|
-
.
|
|
447
|
+
._arrow_clickable_w0fo0_1:hover ._mainPath_w0fo0_11 {
|
|
448
448
|
filter: var(--gantt-hover-filter);
|
|
449
449
|
stroke: var(--gantt-arrow-hover-color, red);
|
|
450
|
-
stroke-width:
|
|
450
|
+
stroke-width: 2px;
|
|
451
|
+
opacity: 1;
|
|
451
452
|
}
|
|
452
453
|
|
|
453
454
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
454
|
-
.
|
|
455
|
+
._arrow_clickable_w0fo0_1:hover polygon {
|
|
455
456
|
fill: var(--gantt-arrow-hover-color, red);
|
|
456
457
|
}
|
|
457
458
|
|
|
458
|
-
.
|
|
459
|
+
._mainPath_w0fo0_11 {
|
|
459
460
|
fill: none;
|
|
460
|
-
stroke-width: 1.
|
|
461
|
+
stroke-width: 1.2px;
|
|
461
462
|
stroke-linecap: round;
|
|
462
463
|
stroke-linejoin: round;
|
|
463
|
-
opacity: 0.
|
|
464
|
+
opacity: 0.55;
|
|
465
|
+
transition:
|
|
466
|
+
stroke-width 0.15s ease,
|
|
467
|
+
opacity 0.15s ease;
|
|
464
468
|
}
|
|
465
469
|
|
|
466
|
-
.
|
|
470
|
+
._clickZone_w0fo0_57 {
|
|
467
471
|
fill: none;
|
|
468
472
|
stroke: transparent;
|
|
469
|
-
stroke-width:
|
|
473
|
+
stroke-width: 12px;
|
|
470
474
|
}
|
|
471
475
|
._relationLine_wh2qy_1 {
|
|
472
476
|
/*noinspection CssUnresolvedCustomProperty*/
|
package/package.json
CHANGED