@syncfusion/ej2-gantt 20.4.43 → 20.4.48

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.
@@ -401,7 +401,7 @@ class DateProcessor {
401
401
  if (hour > this.parent.defaultEndTime) {
402
402
  this.setTime(this.parent.defaultEndTime, cloneDate);
403
403
  }
404
- else if (hour <= this.parent.defaultStartTime && !isNullOrUndefined(ganttProp) && !ganttProp.isMilestone) {
404
+ else if (hour < this.parent.defaultStartTime && !isNullOrUndefined(ganttProp) && !ganttProp.isMilestone) {
405
405
  cloneDate.setDate(cloneDate.getDate() - 1);
406
406
  this.setTime(this.parent.defaultEndTime, cloneDate);
407
407
  }
@@ -6116,7 +6116,7 @@ class Timeline {
6116
6116
  break;
6117
6117
  case 'Month':
6118
6118
  difference = Math.round((timeDifference / (1000 * 3600 * 24)) / 28);
6119
- tierCount = tierCount <= difference ? tierCount : difference > 0 ? difference : 1;
6119
+ tierCount = tierCount <= difference ? tierCount : difference > 0 ? (difference + 1) : 1;
6120
6120
  if (this.topTier !== 'None' && tier === 'bottomTier') {
6121
6121
  tierCount = this.validateBottomTierCount(mode, tierCount);
6122
6122
  }
@@ -10938,6 +10938,14 @@ class Dependency {
10938
10938
  }
10939
10939
  }
10940
10940
  if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
10941
+ let validUpdate = false;
10942
+ let predecessorNames = ganttProp.ganttProperties.predecessorsName ?
10943
+ ganttProp.ganttProperties.predecessorsName.split(',').length : ganttProp.ganttProperties.predecessorsName;
10944
+ let predecessorLength = ganttProp.ganttProperties.predecessor ?
10945
+ ganttProp.ganttProperties.predecessor.length : ganttProp.ganttProperties.predecessor;
10946
+ if ((predecessorLength && predecessorNames !== predecessorLength)) {
10947
+ validUpdate = true;
10948
+ }
10941
10949
  if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
10942
10950
  if (!ganttProp.hasChildRecords && record.hasChildRecords) {
10943
10951
  this.parent.editModule['updateChildItems'](record);
@@ -10945,7 +10953,7 @@ class Dependency {
10945
10953
  }
10946
10954
  }
10947
10955
  else if ((record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
10948
- (!ganttProp.ganttProperties.predecessorsName && taskBarModule.taskBarEditAction == 'ParentDrag')) {
10956
+ (validUpdate && taskBarModule.taskBarEditAction == 'ParentDrag')) {
10949
10957
  this.parent.editModule['updateChildItems'](record);
10950
10958
  this.isValidatedParentTaskID = record.ganttProperties.taskId;
10951
10959
  }
@@ -23384,7 +23392,7 @@ class Edit$2 {
23384
23392
  }
23385
23393
  this.parent.predecessorModule.isValidatedParentTaskID = '';
23386
23394
  /** validating predecessor for current edited records */
23387
- if (ganttRecord.ganttProperties.predecessor) {
23395
+ if (ganttRecord.ganttProperties.predecessorsName) {
23388
23396
  this.parent.isMileStoneEdited = ganttRecord.ganttProperties.isMilestone;
23389
23397
  if (this.taskbarMoved) {
23390
23398
  this.parent.editedTaskBarItem = ganttRecord;