gantt-lib 0.141.2 → 0.142.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.css.map +1 -1
- package/dist/index.js +15 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -38
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6364,6 +6364,9 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
6364
6364
|
if (activityEndpoints && predecessor.rowTop === successor.rowTop) {
|
|
6365
6365
|
fromY = predecessor.rowTop + predecessor.rowHeight / 2;
|
|
6366
6366
|
toY = successor.rowTop + successor.rowHeight / 2;
|
|
6367
|
+
} else if (activityEndpoints) {
|
|
6368
|
+
fromY = reverseOrder ? predecessor.rowTop : predecessor.rowTop + predecessor.rowHeight;
|
|
6369
|
+
toY = reverseOrder ? successor.rowTop + successor.rowHeight : successor.rowTop;
|
|
6367
6370
|
} else if (reverseOrder) {
|
|
6368
6371
|
fromY = predecessor.rowTop + 10;
|
|
6369
6372
|
toY = successor.rowTop + successor.rowHeight - 6;
|
|
@@ -6401,7 +6404,8 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
6401
6404
|
fromY,
|
|
6402
6405
|
reverseOrder,
|
|
6403
6406
|
isVirtual,
|
|
6404
|
-
isCritical
|
|
6407
|
+
isCritical,
|
|
6408
|
+
isCoupling: activityEndpoints && predecessor.rowTop === successor.rowTop && edge.type === "FS" && edge.lag === 0 && Math.abs(fromX - finalToX) < 0.01 && !isVirtual
|
|
6405
6409
|
});
|
|
6406
6410
|
}
|
|
6407
6411
|
}
|
|
@@ -6518,7 +6522,7 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
6518
6522
|
}
|
|
6519
6523
|
)
|
|
6520
6524
|
] }),
|
|
6521
|
-
visibleLines.map(({ id, predecessorId, successorId, linkType, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual, isCritical }) => {
|
|
6525
|
+
visibleLines.map(({ id, predecessorId, successorId, linkType, path, hasCycle, lag, fromX, toX, fromY, reverseOrder, isVirtual, isCritical, isCoupling }) => {
|
|
6522
6526
|
const isHovered = hoveredLineId === id;
|
|
6523
6527
|
const isSelected = selectedDep != null && id === `${selectedDep.predecessorId}-${selectedDep.successorId}-${selectedDep.linkType}`;
|
|
6524
6528
|
let pathClassName = "gantt-dependency-path";
|
|
@@ -6534,7 +6538,7 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
6534
6538
|
else markerEnd = `url(#${markerId("arrowhead")})`;
|
|
6535
6539
|
const lagColor = isSelected ? "#ef4444" : hasCycle ? "var(--gantt-dependency-cycle-color, #ef4444)" : isCritical ? "var(--gantt-critical-path-color, #dc2626)" : "var(--gantt-dependency-line-color, #666666)";
|
|
6536
6540
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react7.default.Fragment, { children: [
|
|
6537
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
6541
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
6538
6542
|
"g",
|
|
6539
6543
|
{
|
|
6540
6544
|
className: `gantt-dependency-line${isHovered ? " gantt-dependency-line-hovered" : ""}`,
|
|
@@ -6552,23 +6556,14 @@ var DependencyLines = import_react7.default.memo(({
|
|
|
6552
6556
|
},
|
|
6553
6557
|
role: "button",
|
|
6554
6558
|
"aria-label": `\u0421\u0432\u044F\u0437\u044C ${linkType}`,
|
|
6555
|
-
children: [
|
|
6556
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
6564
|
-
"path",
|
|
6565
|
-
{
|
|
6566
|
-
d: path,
|
|
6567
|
-
className: pathClassName,
|
|
6568
|
-
markerEnd
|
|
6569
|
-
}
|
|
6570
|
-
)
|
|
6571
|
-
]
|
|
6559
|
+
children: isCoupling ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
6560
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("title", { children: "\u041F\u043E\u0441\u043B\u0435 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F \xB7 \u0431\u0435\u0437 \u043B\u0430\u0433\u0430" }),
|
|
6561
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: toX, cy: fromY, r: 12, className: "gantt-dependency-coupling-hit-area" }),
|
|
6562
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: toX, cy: fromY, r: 4, className: `${pathClassName} gantt-dependency-coupling` })
|
|
6563
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
6564
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: path, className: "gantt-dependency-hit-area" }),
|
|
6565
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: path, className: pathClassName, markerEnd })
|
|
6566
|
+
] })
|
|
6572
6567
|
}
|
|
6573
6568
|
),
|
|
6574
6569
|
showLag && lag !== 0 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|