Skip to content

Commit

Permalink
Merge pull request #3162 from guaizi149/fix/refreshRecordLinkNodes
Browse files Browse the repository at this point in the history
fix: reshresh record link nodes when node not exist
  • Loading branch information
fangsmile authored Dec 23, 2024
2 parents 8aca8b2 + 0d3a871 commit 04a7e90
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion packages/vtable-gantt/src/scenegraph/scenegraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,16 @@ export class Scenegraph {
taskDays: linkedFromTaskTaskDays
} = gantt.getTaskInfoByTaskListIndex(linkedFromTaskShowIndex));
}
if (
!linkedFromTaskStartDate ||
!linkedFromTaskEndDate ||
!linkedToTaskStartDate ||
!linkedToTaskEndDate ||
!linkLineNode ||
!lineArrowNode
) {
return;
}
const { linePoints, arrowPoints } = updateLinkLinePoints(
type,
linkedFromTaskStartDate,
Expand Down Expand Up @@ -545,7 +555,16 @@ export class Scenegraph {
0,
this._gantt
);

if (
!linkedFromTaskStartDate ||
!linkedFromTaskEndDate ||
!linkedToTaskStartDate ||
!linkedToTaskEndDate ||
!linkLineNode ||
!lineArrowNode
) {
return;
}
linkLineNode.setAttribute('points', linePoints);
lineArrowNode.setAttribute('points', arrowPoints);
}
Expand Down

0 comments on commit 04a7e90

Please sign in to comment.