@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.
@@ -1890,7 +1890,10 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
1890
1890
  this.setTime(this.parent.defaultEndTime, baselineEndDate);
1891
1891
  }
1892
1892
  if ((ganttProperties.baselineStartDate && baselineEndDate &&
1893
- (ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) || ganttProperties.isMilestone) {
1893
+ (ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) ||
1894
+ ((!isNullOrUndefined(ganttProperties.baselineStartDate) && !isNullOrUndefined(ganttProperties.startDate) && (ganttProperties.baselineStartDate.getTime() === ganttProperties.startDate.getTime()))
1895
+ && (!isNullOrUndefined(baselineEndDate) && !isNullOrUndefined(ganttProperties.endDate) && (baselineEndDate.toLocaleDateString() === ganttProperties.endDate.toLocaleDateString())) &&
1896
+ ganttProperties.isMilestone)) {
1894
1897
  baselineEndDate = ganttProperties.baselineStartDate;
1895
1898
  }
1896
1899
  this.parent.setRecordValue('baselineEndDate', this.checkBaselineEndDate(baselineEndDate, ganttProperties), ganttProperties, true);
@@ -6342,7 +6345,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
6342
6345
  endDate.setHours(24, 0, 0, 0);
6343
6346
  }
6344
6347
  }
6345
- if (this.isZooming || this.parent.isLoad) {
6348
+ if ((this.isZooming || this.parent.isLoad) && isNullOrUndefined(this.parent.projectEndDate)) {
6346
6349
  this.updateTimelineAfterZooming(endDate, false);
6347
6350
  }
6348
6351
  return endDate;
@@ -9722,7 +9725,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9722
9725
  }
9723
9726
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9724
9727
  this.templateData.ganttProperties.baselineEndDate) {
9725
- taskBaselineTemplateNode = this.getTaskBaselineNode();
9728
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9729
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9730
+ this.templateData.ganttProperties.isMilestone)
9731
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9726
9732
  }
9727
9733
  }
9728
9734
  else if (this.templateData.ganttProperties.isMilestone) {
@@ -9732,7 +9738,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9732
9738
  }
9733
9739
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9734
9740
  this.templateData.ganttProperties.baselineEndDate) {
9735
- taskBaselineTemplateNode = this.getMilestoneBaselineNode();
9741
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9742
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9743
+ this.templateData.ganttProperties.isMilestone)
9744
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9736
9745
  }
9737
9746
  }
9738
9747
  else {
@@ -9777,7 +9786,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
9777
9786
  }
9778
9787
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
9779
9788
  this.templateData.ganttProperties.baselineEndDate) {
9780
- taskBaselineTemplateNode = this.getTaskBaselineNode();
9789
+ taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
9790
+ && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
9791
+ this.templateData.ganttProperties.isMilestone)
9792
+ ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
9781
9793
  }
9782
9794
  }
9783
9795
  if (!this.templateData.hasChildRecords) {
@@ -11919,7 +11931,9 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
11919
11931
  _this.splitterObject.paneSettings[1].size = null;
11920
11932
  _this.splitterObject.paneSettings[1].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionChart);
11921
11933
  }
11922
- _this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
11934
+ if (isNullOrUndefined(_this.parent.projectEndDate)) {
11935
+ _this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
11936
+ }
11923
11937
  callBackPromise.resolve(splitterResizedArgs);
11924
11938
  });
11925
11939
  return callBackPromise;
@@ -28927,7 +28941,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28927
28941
  var currentData = this_1.parent.currentViewData.filter(function (e) {
28928
28942
  return e[uniqueTaskID_1] === ganttData_1[i_1][uniqueTaskID_1];
28929
28943
  })[0];
28930
- if (currentData.index > droppedRecord.index) {
28944
+ if (currentData && currentData.index > droppedRecord.index) {
28931
28945
  endIndex = currentData.index;
28932
28946
  return "break";
28933
28947
  }
@@ -28944,7 +28958,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
28944
28958
  var currentData = this_1.parent.currentViewData.filter(function (e) {
28945
28959
  return e[uniqueTaskID_1] === ganttData_1[i_2][uniqueTaskID_1];
28946
28960
  })[0];
28947
- if (currentData.index > draggedRecord.index) {
28961
+ if (currentData && currentData.index > draggedRecord.index) {
28948
28962
  endIndex = currentData.index;
28949
28963
  return "break";
28950
28964
  }