From 903ce25f4422b3c0e51b536ad329c35dcc8bd461 Mon Sep 17 00:00:00 2001 From: Elizar Ospennikov Date: Fri, 10 Oct 2025 15:04:56 +0300 Subject: [PATCH] [#10344608][#10341698] Fix arror view, fix view for desktop page --- src/GanttElastic.vue | 7 ++++--- src/components/Chart/DependencyLines.vue | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/GanttElastic.vue b/src/GanttElastic.vue index 195eb61..19a05c0 100644 --- a/src/GanttElastic.vue +++ b/src/GanttElastic.vue @@ -1590,12 +1590,13 @@ const GanttElastic = { let lastTaskTime = 0; for (let index = 0, len = this.state.tasks.length; index < len; index++) { let task = this.state.tasks[index]; - const taskStart = Math.min(task.startTime, task.startPlanned); + const plannedStart = typeof task.startPlanned === 'number' ? task.startPlanned : task.startTimePlanned; + const taskStart = Math.min(task.startTime, plannedStart); if (taskStart < firstTaskTime) { firstTaskTime = taskStart; } - - const taskLastTime = Math.max(task.startTime + task.duration, task.startPlanned + task.durationPlanned); + const plannedDuration = typeof task.durationPlanned === 'number' ? task.durationPlanned : 0; + const taskLastTime = Math.max(task.startTime + task.duration, plannedStart + plannedDuration); if (taskLastTime > lastTaskTime) { lastTaskTime = taskLastTime; } diff --git a/src/components/Chart/DependencyLines.vue b/src/components/Chart/DependencyLines.vue index bf4a036..e091886 100644 --- a/src/components/Chart/DependencyLines.vue +++ b/src/components/Chart/DependencyLines.vue @@ -138,7 +138,7 @@ export default { let points = ` ${this.moveCursor(cursour, startX, startY)} ${this.getLine(cursour, startMove, 0)}`; - if (dependencyType === dependencyTypes.startToStart) { + if (dependencyType === dependencyTypes.startToStart || dependencyType === dependencyTypes.startToEnd) { xMultiplier = -1 } else if (dependencyType === dependencyTypes.endToEnd || dependencyType === dependencyTypes.endToStart) { xMultiplier = 1