@syncfusion/ej2-gantt 20.2.45 → 20.2.46

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.
@@ -1853,7 +1853,10 @@ class TaskProcessor extends DateProcessor {
1853
1853
  this.setTime(this.parent.defaultEndTime, baselineEndDate);
1854
1854
  }
1855
1855
  if ((ganttProperties.baselineStartDate && baselineEndDate &&
1856
- (ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) || ganttProperties.isMilestone) {
1856
+ (ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) ||
1857
+ ((!isNullOrUndefined(ganttProperties.baselineStartDate) && !isNullOrUndefined(ganttProperties.startDate) && (ganttProperties.baselineStartDate.getTime() === ganttProperties.startDate.getTime()))
1858
+ && (!isNullOrUndefined(baselineEndDate) && !isNullOrUndefined(ganttProperties.endDate) && (baselineEndDate.toLocaleDateString() === ganttProperties.endDate.toLocaleDateString())) &&
1859
+ ganttProperties.isMilestone)) {
1857
1860
  baselineEndDate = ganttProperties.baselineStartDate;
1858
1861
  }
1859
1862
  this.parent.setRecordValue('baselineEndDate', this.checkBaselineEndDate(baselineEndDate, ganttProperties), ganttProperties, true);
@@ -6276,7 +6279,7 @@ class Timeline {
6276
6279
  endDate.setHours(24, 0, 0, 0);
6277
6280
  }
6278
6281
  }
6279
- if (this.isZooming || this.parent.isLoad) {
6282
+ if ((this.isZooming || this.parent.isLoad) && isNullOrUndefined(this.parent.projectEndDate)) {
6280
6283
  this.updateTimelineAfterZooming(endDate, false);
6281
6284
  }
6282
6285
  return endDate;
@@ -9334,7 +9337,10 @@ class ChartRows extends DateProcessor {
9334
9337
  }
9335
9338
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9336
9339
  this.templateData.ganttProperties.baselineEndDate) {
9337
- taskBaselineTemplateNode = this.getTaskBaselineNode();
9340
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9341
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9342
+ this.templateData.ganttProperties.isMilestone)
9343
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9338
9344
  }
9339
9345
  }
9340
9346
  else if (this.templateData.ganttProperties.isMilestone) {
@@ -9344,7 +9350,10 @@ class ChartRows extends DateProcessor {
9344
9350
  }
9345
9351
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9346
9352
  this.templateData.ganttProperties.baselineEndDate) {
9347
- taskBaselineTemplateNode = this.getMilestoneBaselineNode();
9353
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9354
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9355
+ this.templateData.ganttProperties.isMilestone)
9356
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9348
9357
  }
9349
9358
  }
9350
9359
  else {
@@ -9389,7 +9398,10 @@ class ChartRows extends DateProcessor {
9389
9398
  }
9390
9399
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9391
9400
  this.templateData.ganttProperties.baselineEndDate) {
9392
- taskBaselineTemplateNode = this.getTaskBaselineNode();
9401
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9402
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9403
+ this.templateData.ganttProperties.isMilestone)
9404
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9393
9405
  }
9394
9406
  }
9395
9407
  if (!this.templateData.hasChildRecords) {
@@ -11523,7 +11535,9 @@ class Splitter$1 {
11523
11535
  this.splitterObject.paneSettings[1].size = null;
11524
11536
  this.splitterObject.paneSettings[1].size = this.getSpliterPositionInPercentage(this.splitterPreviousPositionChart);
11525
11537
  }
11526
- this.parent.timelineModule.updateTimelineAfterZooming(this.parent.timelineModule.timelineEndDate, true);
11538
+ if (isNullOrUndefined(this.parent.projectEndDate)) {
11539
+ this.parent.timelineModule.updateTimelineAfterZooming(this.parent.timelineModule.timelineEndDate, true);
11540
+ }
11527
11541
  callBackPromise.resolve(splitterResizedArgs);
11528
11542
  });
11529
11543
  return callBackPromise;
@@ -28376,7 +28390,7 @@ class RowDD$1 {
28376
28390
  let currentData = this.parent.currentViewData.filter(function (e) {
28377
28391
  return e[uniqueTaskID] === ganttData[i][uniqueTaskID];
28378
28392
  })[0];
28379
- if (currentData.index > droppedRecord.index) {
28393
+ if (currentData && currentData.index > droppedRecord.index) {
28380
28394
  endIndex = currentData.index;
28381
28395
  break;
28382
28396
  }
@@ -28388,7 +28402,7 @@ class RowDD$1 {
28388
28402
  let currentData = this.parent.currentViewData.filter(function (e) {
28389
28403
  return e[uniqueTaskID] === ganttData[i][uniqueTaskID];
28390
28404
  })[0];
28391
- if (currentData.index > draggedRecord.index) {
28405
+ if (currentData && currentData.index > draggedRecord.index) {
28392
28406
  endIndex = currentData.index;
28393
28407
  break;
28394
28408
  }