gantt-task-react-v 1.4.3 → 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/gantt-task-react.es.js +35 -19
- package/dist/gantt-task-react.umd.js +35 -19
- package/dist/style.css +9 -9
- package/package.json +1 -1
|
@@ -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,
|
|
@@ -11863,28 +11863,44 @@ const roundedPath = (points, radius) => {
|
|
|
11863
11863
|
d += ` L ${last[0]} ${last[1]}`;
|
|
11864
11864
|
return d;
|
|
11865
11865
|
};
|
|
11866
|
-
const ARROW_CORNER_RADIUS =
|
|
11867
|
-
const
|
|
11868
|
-
|
|
11869
|
-
|
|
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
|
+
};
|
|
11870
11872
|
const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSide, indexTo, toX1, toX2, toY, isTaskToLeftSide, fullRowHeight, taskHeight, arrowIndent, fromConnectionIndex, fromTotalConnections, toConnectionIndex, toTotalConnections) => {
|
|
11871
11873
|
const isDownDirected = indexTo > indexForm;
|
|
11872
|
-
const
|
|
11873
|
-
const
|
|
11874
|
-
const
|
|
11875
|
-
const
|
|
11876
|
-
const
|
|
11877
|
-
const
|
|
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;
|
|
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;
|
|
11884
11880
|
const startX = isTaskFromLeftSide ? fromX1 : fromX2;
|
|
11885
11881
|
const startY = fromY + taskHeight / 2 + fromVertOffset;
|
|
11886
11882
|
const endX = isTaskToLeftSide ? toX1 : toX2;
|
|
11887
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
|
+
}
|
|
11888
11904
|
const rawWaypoints = [
|
|
11889
11905
|
[startX, startY],
|
|
11890
11906
|
[taskFromEndPositionX, startY],
|
|
@@ -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,
|
|
@@ -11880,28 +11880,44 @@
|
|
|
11880
11880
|
d += ` L ${last[0]} ${last[1]}`;
|
|
11881
11881
|
return d;
|
|
11882
11882
|
};
|
|
11883
|
-
const ARROW_CORNER_RADIUS =
|
|
11884
|
-
const
|
|
11885
|
-
|
|
11886
|
-
|
|
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
|
+
};
|
|
11887
11889
|
const drownPathAndTriangle = (indexForm, fromX1, fromX2, fromY, isTaskFromLeftSide, indexTo, toX1, toX2, toY, isTaskToLeftSide, fullRowHeight, taskHeight, arrowIndent, fromConnectionIndex, fromTotalConnections, toConnectionIndex, toTotalConnections) => {
|
|
11888
11890
|
const isDownDirected = indexTo > indexForm;
|
|
11889
|
-
const
|
|
11890
|
-
const
|
|
11891
|
-
const
|
|
11892
|
-
const
|
|
11893
|
-
const
|
|
11894
|
-
const
|
|
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;
|
|
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;
|
|
11901
11897
|
const startX = isTaskFromLeftSide ? fromX1 : fromX2;
|
|
11902
11898
|
const startY = fromY + taskHeight / 2 + fromVertOffset;
|
|
11903
11899
|
const endX = isTaskToLeftSide ? toX1 : toX2;
|
|
11904
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
|
+
}
|
|
11905
11921
|
const rawWaypoints = [
|
|
11906
11922
|
[startX, startY],
|
|
11907
11923
|
[taskFromEndPositionX, startY],
|
package/dist/style.css
CHANGED
|
@@ -439,38 +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
451
|
opacity: 1;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
/*noinspection CssUnresolvedCustomProperty*/
|
|
455
|
-
.
|
|
455
|
+
._arrow_clickable_w0fo0_1:hover polygon {
|
|
456
456
|
fill: var(--gantt-arrow-hover-color, red);
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
.
|
|
459
|
+
._mainPath_w0fo0_11 {
|
|
460
460
|
fill: none;
|
|
461
|
-
stroke-width: 1.
|
|
461
|
+
stroke-width: 1.2px;
|
|
462
462
|
stroke-linecap: round;
|
|
463
463
|
stroke-linejoin: round;
|
|
464
|
-
opacity: 0.
|
|
464
|
+
opacity: 0.55;
|
|
465
465
|
transition:
|
|
466
466
|
stroke-width 0.15s ease,
|
|
467
467
|
opacity 0.15s ease;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
.
|
|
470
|
+
._clickZone_w0fo0_57 {
|
|
471
471
|
fill: none;
|
|
472
472
|
stroke: transparent;
|
|
473
|
-
stroke-width:
|
|
473
|
+
stroke-width: 12px;
|
|
474
474
|
}
|
|
475
475
|
._relationLine_wh2qy_1 {
|
|
476
476
|
/*noinspection CssUnresolvedCustomProperty*/
|
package/package.json
CHANGED