Browse Source

Quick fix

pull/1/head
Wahyu Ramadhan 1 year ago
parent
commit
703107b599
  1. 32
      view-mode/function/overlaySCurve.js

32
view-mode/function/overlaySCurve.js

@ -121,27 +121,27 @@ function getProgressLine(){
function getScalePaddings(values){ function getScalePaddings(values){
var scale = gantt.getScale(); var scale = gantt.getScale();
var dataRange = gantt.getSubtaskDates(); var dataRange = gantt.getSubtaskDates();
let minDate = new Date(); // let minDate = new Date();
let maxDate = new Date(); // let maxDate = new Date();
let minValueDate = new Date(values.dates[0]); let minValueDate = new Date(values.dates[0]);
let maxValueDate = new Date(values.dates[values.dates.length -1]); let maxValueDate = new Date(values.dates[values.dates.length -1]);
gantt.eachTask(function(task){ // gantt.eachTask(function(task){
let plannedEarlier = task.planned_start < task.start_date; // let plannedEarlier = task.planned_start < task.start_date;
let plannedLater = task.planned_end > task.end_date; // let plannedLater = task.planned_end > task.end_date;
if (plannedEarlier) { // if (plannedEarlier) {
minDate = new Date(Math.min(minDate.getTime(), task.planned_start.getTime())); // minDate = new Date(Math.min(minDate.getTime(), task.planned_start.getTime()));
} else { // } else {
minDate = new Date(Math.min(minDate.getTime(), task.start_date.getTime())); // minDate = new Date(Math.min(minDate.getTime(), task.start_date.getTime()));
} // }
if (plannedLater) { // if (plannedLater) {
maxDate = new Date(Math.max(maxDate.getTime(), task.planned_end.getTime())); // maxDate = new Date(Math.max(maxDate.getTime(), task.planned_end.getTime()));
} else { // } else {
maxDate = new Date(Math.max(maxDate.getTime(), task.end_date.getTime())); // maxDate = new Date(Math.max(maxDate.getTime(), task.end_date.getTime()));
} // }
}) // })
var padding = { var padding = {
left:0, left:0,

Loading…
Cancel
Save