@syncfusion/ej2-gantt 24.2.8 → 24.2.9

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.
@@ -3942,7 +3942,7 @@ class TaskProcessor extends DateProcessor {
3942
3942
  let deleteUpdate = false;
3943
3943
  const ganttProp = parentData.ganttProperties;
3944
3944
  if (this.parent.autoCalculateDateScheduling || this.parent.viewType === "ResourceView") {
3945
- if (parentData.childRecords.length > 0) {
3945
+ if (parentData.childRecords && parentData.childRecords.length > 0) {
3946
3946
  const previousStartDate = ganttProp.isAutoSchedule ? ganttProp.startDate : ganttProp.autoStartDate;
3947
3947
  const previousEndDate = ganttProp.isAutoSchedule ? ganttProp.endDate :
3948
3948
  ganttProp.autoEndDate;
@@ -6341,7 +6341,15 @@ class Timeline {
6341
6341
  const currentZoomingLevel = this.checkCurrentZoomingLevel();
6342
6342
  this.isZoomIn = isZoomIn;
6343
6343
  this.isZooming = true;
6344
- let currentLevel = isZoomIn ? currentZoomingLevel + 1 : currentZoomingLevel - 1;
6344
+ let currentLevel;
6345
+ let level = isZoomIn ? currentZoomingLevel + 1 : currentZoomingLevel - 1;
6346
+ const foundLevel = this.parent.zoomingLevels.find(tempLevel => tempLevel.level === level);
6347
+ if (foundLevel) {
6348
+ currentLevel = level;
6349
+ }
6350
+ else {
6351
+ currentLevel = currentZoomingLevel;
6352
+ }
6345
6353
  if (this.parent.toolbarModule) {
6346
6354
  if (isZoomIn) {
6347
6355
  if (currentLevel === this.parent.zoomingLevels[this.parent.zoomingLevels.length - 1].level) {
@@ -28245,7 +28253,7 @@ class Edit$2 {
28245
28253
  const fromRecord = this.parent.getRecordByID(predecessorCollection[count].from);
28246
28254
  const toRecord = this.parent.getRecordByID(predecessorCollection[count].to);
28247
28255
  validPredecessor = this.parent.connectorLineEditModule.validateParentPredecessor(fromRecord, toRecord);
28248
- if (!validPredecessor) {
28256
+ if (!validPredecessor || !this.parent.allowParentDependency) {
28249
28257
  if (predecessorCollection[count].to === parentRecordTaskData.rowUniqueID.toString()) {
28250
28258
  childRecord = this.parent.getRecordByID(predecessorCollection[count].from);
28251
28259
  predecessorIndex = getIndex(predecessorCollection[count], 'from', childRecord.ganttProperties.predecessor, 'to');
@@ -28271,7 +28279,7 @@ class Edit$2 {
28271
28279
  }
28272
28280
  }
28273
28281
  }
28274
- if (!validPredecessor) {
28282
+ if (!validPredecessor || !this.parent.allowParentDependency) {
28275
28283
  this.parent.setRecordValue('predecessor', updatedPredecessor, parentRecord.ganttProperties, true);
28276
28284
  this.parent.setRecordValue('predecessorsName', '', parentRecord.ganttProperties, true);
28277
28285
  }
@@ -28513,14 +28521,15 @@ class Edit$2 {
28513
28521
  }
28514
28522
  for (let i = 0; i < this.parent.modifiedRecords.length; i++) {
28515
28523
  const originalData = this.parent.modifiedRecords[i];
28516
- let treeIndex = this.parent.allowRowDragAndDrop ? 1 : 0;
28524
+ let treeIndex = this.parent.rowDragAndDropModule && this.parent.allowRowDragAndDrop ? 1 : 0;
28517
28525
  const uniqueTaskID = this.parent.taskFields.id;
28518
28526
  let originalIndex = this.parent.currentViewData.findIndex((data) => {
28519
28527
  return (data[uniqueTaskID] === originalData[uniqueTaskID]);
28520
28528
  });
28521
28529
  if (this.parent.treeGrid.getRows()[originalIndex]) {
28530
+ const row = this.parent.treeGrid.grid.getRowObjectFromUID(this.parent.treeGrid.grid.getDataRows()[originalIndex].getAttribute('data-uid'));
28522
28531
  this.parent.treeGrid.renderModule.cellRender({
28523
- data: originalData, cell: this.parent.treeGrid.getRows()[originalIndex].cells[this.parent.treeColumnIndex + treeIndex],
28532
+ data: row.data, cell: this.parent.treeGrid.getRows()[originalIndex].cells[this.parent.treeColumnIndex + treeIndex],
28524
28533
  column: this.parent.treeGrid.grid.getColumns()[this.parent.treeColumnIndex],
28525
28534
  requestType: 'rowDragAndDrop'
28526
28535
  });
@@ -37677,7 +37686,7 @@ class PdfGanttTaskbarCollection {
37677
37686
  progressFormat.alignment = PdfTextAlignment.Right;
37678
37687
  let isLabelString = false;
37679
37688
  let updatedWidth;
37680
- if (!isNullOrUndefined(this.taskLabel) && (/^[a-zA-Z]/.test(this.taskLabel))) {
37689
+ if (!isNullOrUndefined(this.taskLabel) && (/^[a-zA-Z0-9]/.test(this.taskLabel))) {
37681
37690
  isLabelString = true;
37682
37691
  progressFormat.alignment = PdfTextAlignment.Left;
37683
37692
  }
@@ -38840,12 +38849,6 @@ class PdfTimeline {
38840
38849
  }
38841
38850
  //Secondary header Event Arguments
38842
38851
  /* eslint-disable-next-line */
38843
- if (!this.parent.pdfExportModule.gantt.taskbar.isAutoFit() && this.parent.timelineModule.bottomTier !== "Day") {
38844
- var unit = this.parent.perDayWidth;
38845
- if (width < unit || (width > unit)) {
38846
- width = unit;
38847
- }
38848
- }
38849
38852
  this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false, secondHeader.startDate);
38850
38853
  this.bottomTierPoint.x = (this.parent.pdfExportModule.gantt.taskbar.isAutoFit()) ? this.bottomTierPoint.x + width : this.bottomTierPoint.x + pixelToPoint(width);
38851
38854
  remainWidth -= width;