gantt-lib 0.142.1 → 0.142.2
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.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6121,10 +6121,11 @@ function areBothHiddenInSameParent(predecessorId, successorId, collapsedParentId
|
|
|
6121
6121
|
if (!predVisibleAncestor || !succVisibleAncestor) return false;
|
|
6122
6122
|
return predVisibleAncestor.id === succVisibleAncestor.id;
|
|
6123
6123
|
}
|
|
6124
|
+
var EMPTY_COLLAPSED_PARENT_IDS = /* @__PURE__ */ new Set();
|
|
6124
6125
|
var DependencyLines = import_react7.default.memo(({
|
|
6125
6126
|
tasks,
|
|
6126
6127
|
allTasks,
|
|
6127
|
-
collapsedParentIds =
|
|
6128
|
+
collapsedParentIds = EMPTY_COLLAPSED_PARENT_IDS,
|
|
6128
6129
|
monthStart,
|
|
6129
6130
|
dayWidth,
|
|
6130
6131
|
rowHeight,
|
|
@@ -6505,10 +6506,12 @@ function ActivityDependencyLines(props) {
|
|
|
6505
6506
|
const layout = (0, import_react8.useMemo)(() => {
|
|
6506
6507
|
const flattened = [], rendered = [], tops = [], heights = [];
|
|
6507
6508
|
const indices = /* @__PURE__ */ new Map();
|
|
6509
|
+
const neededRows = /* @__PURE__ */ new Set();
|
|
6508
6510
|
const incoming = /* @__PURE__ */ new Map();
|
|
6509
6511
|
const selected = props.highlight ? new Set(props.highlight.activities.map((activity) => activityKey(activity.taskId, activity.activityId))) : void 0;
|
|
6510
6512
|
const highlightMode = props.highlight?.mode ?? "chain";
|
|
6511
6513
|
for (const edge of dependencies) {
|
|
6514
|
+
if (!props.renderedTaskIds.has(edge.predecessorTaskId) && !props.renderedTaskIds.has(edge.successorTaskId)) continue;
|
|
6512
6515
|
if (selected) {
|
|
6513
6516
|
const fromSelected = selected.has(activityKey(edge.predecessorTaskId, edge.predecessorActivityId));
|
|
6514
6517
|
const toSelected = selected.has(activityKey(edge.successorTaskId, edge.successorActivityId));
|
|
@@ -6517,12 +6520,15 @@ function ActivityDependencyLines(props) {
|
|
|
6517
6520
|
const outgoing = fromSelected && !toSelected && (highlightMode === "chain-outgoing" || highlightMode === "chain-all");
|
|
6518
6521
|
if (!internal && !incoming2 && !outgoing) continue;
|
|
6519
6522
|
}
|
|
6523
|
+
neededRows.add(edge.predecessorTaskId);
|
|
6524
|
+
neededRows.add(edge.successorTaskId);
|
|
6520
6525
|
const id = activityKey(edge.successorTaskId, edge.successorActivityId);
|
|
6521
6526
|
const values = incoming.get(id) ?? [];
|
|
6522
6527
|
values.push({ taskId: activityKey(edge.predecessorTaskId, edge.predecessorActivityId), type: edge.type, lag: edge.lag });
|
|
6523
6528
|
incoming.set(id, values);
|
|
6524
6529
|
}
|
|
6525
6530
|
for (const task of tasks) {
|
|
6531
|
+
if (!neededRows.has(task.id)) continue;
|
|
6526
6532
|
const row = props.rowIndexByTaskId.get(task.id);
|
|
6527
6533
|
if (row === void 0 || !task.activities?.length) continue;
|
|
6528
6534
|
const height = props.rowHeights[row] ?? props.rowHeight;
|