@syncfusion/ej2-gantt 24.1.44 → 24.1.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +21 -2
  2. package/dist/ej2-gantt.min.js +2 -2
  3. package/dist/ej2-gantt.umd.min.js +2 -2
  4. package/dist/ej2-gantt.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-gantt.es2015.js +128 -51
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +133 -55
  8. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  9. package/dist/global/ej2-gantt.min.js +2 -2
  10. package/dist/global/ej2-gantt.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +16 -16
  13. package/src/gantt/actions/dialog-edit.js +16 -1
  14. package/src/gantt/actions/edit.js +21 -7
  15. package/src/gantt/actions/pdf-export.d.ts +2 -1
  16. package/src/gantt/actions/pdf-export.js +3 -3
  17. package/src/gantt/actions/taskbar-edit.js +4 -4
  18. package/src/gantt/base/task-processor.js +41 -28
  19. package/src/gantt/base/tree-grid.d.ts +1 -0
  20. package/src/gantt/base/tree-grid.js +3 -0
  21. package/src/gantt/export/export-helper.js +3 -2
  22. package/src/gantt/export/pdf-taskbar.js +42 -10
  23. package/styles/bootstrap-dark.css +1 -1
  24. package/styles/bootstrap.css +1 -1
  25. package/styles/bootstrap4.css +1 -1
  26. package/styles/bootstrap5-dark.css +1 -1
  27. package/styles/bootstrap5.css +1 -1
  28. package/styles/fabric-dark.css +1 -1
  29. package/styles/fabric.css +1 -1
  30. package/styles/fluent-dark.css +1 -1
  31. package/styles/fluent.css +1 -1
  32. package/styles/gantt/_layout.scss +1 -1
  33. package/styles/gantt/bootstrap-dark.css +1 -1
  34. package/styles/gantt/bootstrap.css +1 -1
  35. package/styles/gantt/bootstrap4.css +1 -1
  36. package/styles/gantt/bootstrap5-dark.css +1 -1
  37. package/styles/gantt/bootstrap5.css +1 -1
  38. package/styles/gantt/fabric-dark.css +1 -1
  39. package/styles/gantt/fabric.css +1 -1
  40. package/styles/gantt/fluent-dark.css +1 -1
  41. package/styles/gantt/fluent.css +1 -1
  42. package/styles/gantt/highcontrast-light.css +1 -1
  43. package/styles/gantt/highcontrast.css +1 -1
  44. package/styles/gantt/material-dark.css +1 -1
  45. package/styles/gantt/material.css +1 -1
  46. package/styles/gantt/material3-dark.css +1 -1
  47. package/styles/gantt/material3.css +1 -1
  48. package/styles/gantt/tailwind-dark.css +1 -1
  49. package/styles/gantt/tailwind.css +1 -1
  50. package/styles/highcontrast-light.css +1 -1
  51. package/styles/highcontrast.css +1 -1
  52. package/styles/material-dark.css +1 -1
  53. package/styles/material.css +1 -1
  54. package/styles/material3-dark.css +1 -1
  55. package/styles/material3.css +1 -1
  56. package/styles/tailwind-dark.css +1 -1
  57. package/styles/tailwind.css +1 -1
@@ -1629,19 +1629,25 @@ class TaskProcessor extends DateProcessor {
1629
1629
  const queryManager = this.parent.query instanceof Query ? this.parent.query : new Query();
1630
1630
  queryManager.requiresCount();
1631
1631
  const dataManager = this.parent.dataSource;
1632
- dataManager.executeQuery(queryManager).then((e) => {
1633
- this.dataArray = e.result;
1632
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
1634
1633
  this.processTimeline();
1635
- if (this.parent.loadChildOnDemand || (!this.parent.loadChildOnDemand && !(this.parent.taskFields.hasChildMapping))) {
1636
- this.cloneDataSource();
1637
- }
1638
- this.parent.renderGantt(isChange);
1639
- }).catch((e) => {
1640
- // Trigger action failure event
1641
- this.parent.processTimeline();
1642
1634
  this.parent.renderGantt(isChange);
1643
- this.parent.trigger('actionFailure', { error: e });
1644
- });
1635
+ }
1636
+ else {
1637
+ dataManager.executeQuery(queryManager).then((e) => {
1638
+ this.dataArray = e.result;
1639
+ this.processTimeline();
1640
+ if (this.parent.loadChildOnDemand || (!this.parent.loadChildOnDemand && !(this.parent.taskFields.hasChildMapping))) {
1641
+ this.cloneDataSource();
1642
+ }
1643
+ this.parent.renderGantt(isChange);
1644
+ }).catch((e) => {
1645
+ // Trigger action failure event
1646
+ this.parent.processTimeline();
1647
+ this.parent.renderGantt(isChange);
1648
+ this.parent.trigger('actionFailure', { error: e });
1649
+ });
1650
+ }
1645
1651
  }
1646
1652
  constructDataSource(dataSource) {
1647
1653
  const mappingData = new DataManager(dataSource).executeLocal(new Query()
@@ -3802,14 +3808,11 @@ class TaskProcessor extends DateProcessor {
3802
3808
  */
3803
3809
  updateWidthLeft(data) {
3804
3810
  const ganttRecord = data.ganttProperties;
3811
+ let totalSegmentsProgressWidth = 0;
3805
3812
  // task endDate may be changed in segment calculation so this must be calculated first.
3806
3813
  // task width calculating was based on endDate
3807
3814
  if (!isNullOrUndefined(ganttRecord.segments) && ganttRecord.segments.length > 0) {
3808
3815
  const segments = ganttRecord.segments;
3809
- let fixedWidth = true;
3810
- const totalTaskWidth = this.splitTasksDuration(segments) * ((this.parent.timelineModule.bottomTier === "Hour" || this.parent.timelineModule.bottomTier === "Minutes") ? this.parent.timelineSettings.timelineUnitSize : this.parent.perDayWidth);
3811
-
3812
- let totalProgressWidth = this.parent.dataOperation.getProgressWidth(totalTaskWidth, ganttRecord.progress);
3813
3816
  for (let i = 0; i < segments.length; i++) {
3814
3817
  const segment = segments[i];
3815
3818
  if (i === 0 && !isNullOrUndefined(ganttRecord.startDate) &&
@@ -3820,22 +3823,27 @@ class TaskProcessor extends DateProcessor {
3820
3823
  this.parent.chartRowsModule.incrementSegments(segments, 0, data);
3821
3824
  }
3822
3825
  segment.width = this.getSplitTaskWidth(segment.startDate, segment.duration, data);
3826
+ totalSegmentsProgressWidth = totalSegmentsProgressWidth + segment.width;
3823
3827
  segment.showProgress = false;
3824
3828
  segment.progressWidth = -1;
3825
3829
  if (i !== 0) {
3826
3830
  const pStartDate = new Date(ganttRecord.startDate.getTime());
3827
3831
  segment.left = this.getSplitTaskLeft(segment.startDate, pStartDate);
3828
3832
  }
3829
- if (totalProgressWidth > 0 && totalProgressWidth > segment.width) {
3830
- totalProgressWidth = totalProgressWidth - segment.width;
3831
- segment.progressWidth = segment.width;
3832
- segment.showProgress = false;
3833
- }
3834
- else if (fixedWidth) {
3835
- segment.progressWidth = totalProgressWidth;
3836
- segment.showProgress = true;
3837
- totalProgressWidth = totalProgressWidth - segment.width;
3838
- fixedWidth = false;
3833
+ }
3834
+ let setProgress = this.parent.dataOperation.getProgressWidth(totalSegmentsProgressWidth, ganttRecord.progress);
3835
+ let isValid = true;
3836
+ for (let i = 0; i < segments.length; i++) {
3837
+ if (isValid) {
3838
+ if (setProgress <= segments[i].width) {
3839
+ segments[i].progressWidth = setProgress;
3840
+ segments[i].showProgress = true;
3841
+ isValid = false;
3842
+ }
3843
+ else {
3844
+ segments[i].progressWidth = segments[i].width;
3845
+ setProgress = setProgress - segments[i].progressWidth;
3846
+ }
3839
3847
  }
3840
3848
  }
3841
3849
  this.parent.setRecordValue('segments', ganttRecord.segments, ganttRecord, true);
@@ -3843,7 +3851,12 @@ class TaskProcessor extends DateProcessor {
3843
3851
  }
3844
3852
  this.parent.setRecordValue('width', this.parent.dataOperation.calculateWidth(data), ganttRecord, true);
3845
3853
  this.parent.setRecordValue('left', this.parent.dataOperation.calculateLeft(ganttRecord), ganttRecord, true);
3846
- this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth((ganttRecord.isAutoSchedule || !data.hasChildRecords ? ganttRecord.width : ganttRecord.autoWidth), ganttRecord.progress), ganttRecord, true);
3854
+ if (!isNullOrUndefined(ganttRecord.segments) && ganttRecord.segments.length > 0) {
3855
+ this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth(totalSegmentsProgressWidth, ganttRecord.progress), ganttRecord, true);
3856
+ }
3857
+ else {
3858
+ this.parent.setRecordValue('progressWidth', this.parent.dataOperation.getProgressWidth((ganttRecord.isAutoSchedule || !data.hasChildRecords ? ganttRecord.width : ganttRecord.autoWidth), ganttRecord.progress), ganttRecord, true);
3859
+ }
3847
3860
  }
3848
3861
  /**
3849
3862
  * method to update left, width, progress width in record
@@ -8028,6 +8041,9 @@ class GanttTreeGrid {
8028
8041
  this.bindEvents();
8029
8042
  const root = 'root';
8030
8043
  this.parent.treeGrid[root] = this.parent[root] ? this.parent[root] : this.parent;
8044
+ setValue('registeredTemplate', this.registeredTemplate, this.parent.treeGrid.grid);
8045
+ const ref = 'viewContainerRef';
8046
+ setValue('viewContainerRef', this[`${ref}`], this.parent.treeGrid.grid);
8031
8047
  this.parent.treeGrid.appendTo(this.treeGridElement);
8032
8048
  if (this.parent.treeGrid.grid && this.parent.toolbarModule && this.parent.isReact) {
8033
8049
  this.parent.treeGrid.grid.portals = this.parent.portals;
@@ -20926,7 +20942,7 @@ class TaskbarEdit extends DateProcessor {
20926
20942
  pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
20927
20943
  /* To render the milestone in proper date while editing */
20928
20944
  if (isMilestone && !isNullOrUndefined(property.predecessorsName) && property.predecessorsName !== '') {
20929
- pStartDate.setDate(pStartDate.getDate() - 1);
20945
+ // pStartDate.setDate(pStartDate.getDate()-1);
20930
20946
  this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
20931
20947
  pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
20932
20948
  }
@@ -20936,9 +20952,9 @@ class TaskbarEdit extends DateProcessor {
20936
20952
  if (this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && !this.parent.isInDst(pStartDate)) {
20937
20953
  pStartDate.setTime(pStartDate.getTime() + (60 * 60 * 1000));
20938
20954
  }
20939
- else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
20940
- pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
20941
- }
20955
+ // else if (!this.parent.isInDst(new Date(this.parent.timelineModule.timelineStartDate.toString())) && this.parent.isInDst(pStartDate)) {
20956
+ // pStartDate.setTime(pStartDate.getTime() - (60 * 60 * 1000));
20957
+ // }
20942
20958
  }
20943
20959
  return pStartDate;
20944
20960
  }
@@ -23903,6 +23919,9 @@ class DialogEdit {
23903
23919
  const ganttObj = this.parent;
23904
23920
  const resourceSettings = ganttObj.resourceFields;
23905
23921
  const ganttData = this.beforeOpenArgs.rowData;
23922
+ if (((this.beforeOpenArgs.requestType === 'beforeOpenEditDialog' && !isNullOrUndefined(this.editedRecord[this.parent.taskFields.resourceInfo])) || (this.beforeOpenArgs.requestType === 'beforeOpenAddDialog' && !isNullOrUndefined(this.editedRecord[this.parent.taskFields.resourceInfo]))) && (typeof (this.editedRecord[this.parent.taskFields.resourceInfo]) === "object")) {
23923
+ this.parent.setRecordValue('resourceInfo', this.parent.dataOperation.setResourceInfo(this.editedRecord), ganttData.ganttProperties, true);
23924
+ }
23906
23925
  const rowResource = ganttData.ganttProperties.resourceInfo;
23907
23926
  const inputModel = this.beforeOpenArgs[itemName];
23908
23927
  const resourceTreeGridId = ganttObj.element.id + '' + itemName + 'TabContainer';
@@ -23941,6 +23960,11 @@ class DialogEdit {
23941
23960
  this.ganttResources.push(resourceInfo[i]);
23942
23961
  }
23943
23962
  }
23963
+ else if (!this.isEdit && !isNullOrUndefined(resourceInfo)) {
23964
+ for (let i = 0; i < resourceInfo.length; i++) {
23965
+ this.ganttResources.push(resourceInfo[i]);
23966
+ }
23967
+ }
23944
23968
  inputModel.rowSelected = (args) => {
23945
23969
  this.updateResourceCollection(args, resourceTreeGridId);
23946
23970
  };
@@ -24349,7 +24373,14 @@ class DialogEdit {
24349
24373
  }
24350
24374
  }
24351
24375
  else {
24352
- tasksData[fieldName] = controlObj.value;
24376
+ if (fieldName === "Duration") {
24377
+ let numericValue = parseFloat(String(controlObj.value));
24378
+
24379
+ tasksData[fieldName] = numericValue;
24380
+ }
24381
+ else {
24382
+ tasksData[fieldName] = controlObj.value;
24383
+ }
24353
24384
  if (this.parent.enableHtmlSanitizer && typeof (controlObj.value) === 'string') {
24354
24385
  controlObj.value = SanitizeHtmlHelper.sanitize(controlObj.value);
24355
24386
  tasksData[fieldName] = controlObj.value;
@@ -27002,9 +27033,11 @@ class Edit$2 {
27002
27033
  const taskID = updateRecord.ganttProperties.taskId;
27003
27034
  const resourceID = prevResource[index][this.parent.resourceFields.id];
27004
27035
  const record = flatRecords[this.parent.getTaskIds().indexOf('R' + resourceID)];
27005
- for (let j = 0; j < record.childRecords.length; j++) {
27006
- if (record.childRecords[j].ganttProperties.taskId === taskID) {
27007
- this.removeChildRecord(record.childRecords[j]);
27036
+ if (!isNullOrUndefined(record)) {
27037
+ for (let j = 0; j < record.childRecords.length; j++) {
27038
+ if (record.childRecords[j].ganttProperties.taskId === taskID) {
27039
+ this.removeChildRecord(record.childRecords[j]);
27040
+ }
27008
27041
  }
27009
27042
  }
27010
27043
  }
@@ -28530,10 +28563,15 @@ class Edit$2 {
28530
28563
  }
28531
28564
  if (!isNullOrUndefined(args.data[`${tempTaskID}`])) {
28532
28565
  if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
28566
+ for (const key of Object.keys(this.parent.ids)) {
28567
+ if (this.parent.ids[key] === args.data['ganttProperties']['taskId'].toString()) {
28568
+ this.parent.ids[key] = args.data[tempTaskID].toString();
28569
+ break;
28570
+ }
28571
+ }
28533
28572
  args.data['ganttProperties']['taskId'] = args.data[tempTaskID];
28534
28573
  args.newTaskData[tempTaskID] = args.data[tempTaskID];
28535
28574
  args.data['ganttProperties']['rowUniqueID'] = args.data[tempTaskID].toString();
28536
- this.parent.ids.push(args.data[tempTaskID].toString());
28537
28575
  }
28538
28576
  }
28539
28577
  if (!args.cancel) {
@@ -28543,7 +28581,6 @@ class Edit$2 {
28543
28581
  addedRecords: [args.newTaskData],
28544
28582
  changedRecords: args.modifiedTaskData
28545
28583
  };
28546
- const prevID = args.data.ganttProperties.taskId.toString();
28547
28584
  /* tslint:disable-next-line */
28548
28585
  const query = this.parent.query instanceof Query ? this.parent.query : new Query();
28549
28586
  const adaptor = data.adaptor;
@@ -28551,6 +28588,13 @@ class Edit$2 {
28551
28588
  /* tslint:disable-next-line */
28552
28589
  const crud = data.saveChanges(updatedData, this.parent.taskFields.id, null, query);
28553
28590
  crud.then((e) => {
28591
+ if (e.addedRecords[0][this.parent.taskFields.id].toString() != args.data['ganttProperties']['taskId']) {
28592
+ args.data['ganttProperties']['taskId'] = e.addedRecords[0][this.parent.taskFields.id].toString();
28593
+ args.newTaskData[tempTaskID] = e.addedRecords[0][this.parent.taskFields.id].toString();
28594
+ args.data['ganttProperties']['rowUniqueID'] = e.addedRecords[0][this.parent.taskFields.id].toString();
28595
+ this.parent.ids.push(e.addedRecords[0][this.parent.taskFields.id].toString());
28596
+ }
28597
+ const prevID = args.data.ganttProperties.taskId.toString();
28554
28598
  if (this.parent.taskFields.id && !isNullOrUndefined(e.addedRecords[0][this.parent.taskFields.id]) &&
28555
28599
  e.addedRecords[0][this.parent.taskFields.id].toString() == prevID) {
28556
28600
  this.parent.setRecordValue('taskId', e.addedRecords[0][this.parent.taskFields.id], args.data.ganttProperties, true);
@@ -37036,9 +37080,11 @@ class ExportHelper {
37036
37080
  compositeField.draw(footer.graphics, new PointF(0, 0));
37037
37081
  pdfDoc.template.bottom = footer;
37038
37082
  }
37083
+ const PdfPage$$1 = this.parent.pdfExportModule.pdfPage;
37084
+ const pageSize = PdfPage$$1.size;
37085
+ const clientSize = !isNullOrUndefined(pageSize) ? pageSize : this.pdfDoc.pageSettings.size;
37039
37086
  // code for draw header content
37040
37087
  if (!isNullOrUndefined(this.exportProps.header)) {
37041
- const clientSize = this.pdfDoc.pageSettings.size;
37042
37088
  const headerProp = this.exportProps.header;
37043
37089
  const position = new PointF(0, headerProp.fromTop);
37044
37090
  const size = new SizeF((clientSize.width * 1.1), ((headerProp && headerProp.height) ? headerProp.height * 0.75 : 50));
@@ -37047,7 +37093,6 @@ class ExportHelper {
37047
37093
  }
37048
37094
  // code for customization of footer
37049
37095
  if (!this.exportProps.enableFooter && !isNullOrUndefined(this.exportProps.footer)) {
37050
- const clientSize = this.pdfDoc.pageSettings.size;
37051
37096
  const footer = this.exportProps.footer;
37052
37097
  const position = new PointF(0, ((clientSize.width - 80) - ((footer && footer.fromBottom) ?
37053
37098
  footer.fromBottom * 0.75 : 0)));
@@ -37451,13 +37496,32 @@ class PdfGanttTaskbarCollection {
37451
37496
  progressFormat.alignment = PdfTextAlignment.Left;
37452
37497
  }
37453
37498
  let pageIndex = -1;
37499
+ let renderBaselineWidth = 0;
37500
+ if (this.baselineWidth > detail.totalWidth) {
37501
+ if (this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) {
37502
+ renderBaselineWidth = detail.totalWidth - this.baselineLeft;
37503
+ }
37504
+ else {
37505
+ renderBaselineWidth = detail.totalWidth;
37506
+ }
37507
+ this.baselineWidth = this.baselineWidth - detail.totalWidth;
37508
+ }
37509
+ else {
37510
+ if ((this.parent.timelineModule.isZoomedToFit || this.isAutoFit()) && this.baselineWidth + this.baselineLeft > detail.totalWidth) {
37511
+ renderBaselineWidth = detail.totalWidth - this.baselineLeft;
37512
+ }
37513
+ else {
37514
+ renderBaselineWidth = this.baselineWidth;
37515
+ }
37516
+ }
37517
+ const baselinePen = new PdfPen(taskbar.baselineBorderColor);
37518
+ const baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
37519
+ let renderedBaseline = false;
37454
37520
  if (!taskbar.isMilestone) {
37455
37521
  const taskbarPen = new PdfPen(taskbar.taskBorderColor);
37456
37522
  const taskBrush = new PdfSolidBrush(taskbar.taskColor);
37457
- const baselinePen = new PdfPen(taskbar.baselineBorderColor);
37458
37523
  const manualParentBorderPen = new PdfPen(taskbar.manualParentBorder);
37459
37524
  const manualChildBorderPen = new PdfPen(taskbar.manualChildBorder);
37460
- const baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
37461
37525
  const manualTaskbarPen = new PdfPen(taskbar.manuallineColor);
37462
37526
  const manualParentPen = new PdfPen(taskbar.manualParentProgress);
37463
37527
  const manualline = new PdfPen(taskbar.manuallineColor);
@@ -37528,11 +37592,12 @@ class PdfGanttTaskbarCollection {
37528
37592
  else {
37529
37593
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
37530
37594
  if (this.isAutoFit()) {
37531
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
37595
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
37532
37596
  }
37533
37597
  else {
37534
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
37598
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
37535
37599
  }
37600
+ renderedBaseline = true;
37536
37601
  }
37537
37602
  if (taskbar.isSpliterTask) {
37538
37603
  splitline.dashStyle = PdfDashStyle.Dot;
@@ -37745,11 +37810,12 @@ class PdfGanttTaskbarCollection {
37745
37810
  else {
37746
37811
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
37747
37812
  if (this.isAutoFit()) {
37748
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
37813
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
37749
37814
  }
37750
37815
  else {
37751
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
37816
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
37752
37817
  }
37818
+ renderedBaseline = true;
37753
37819
  }
37754
37820
  if (taskbar.isSpliterTask) {
37755
37821
  let pervwidth = 0;
@@ -37906,11 +37972,12 @@ class PdfGanttTaskbarCollection {
37906
37972
  }
37907
37973
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
37908
37974
  if (this.isAutoFit()) {
37909
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
37975
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
37910
37976
  }
37911
37977
  else {
37912
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
37978
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
37913
37979
  }
37980
+ renderedBaseline = true;
37914
37981
  }
37915
37982
  if (!this.isScheduledTask && this.unscheduledTaskBy === 'duration') {
37916
37983
  let brush1;
@@ -38062,11 +38129,12 @@ class PdfGanttTaskbarCollection {
38062
38129
  }
38063
38130
  if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
38064
38131
  if (this.isAutoFit()) {
38065
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (this.baselineWidth), pixelToPoint(this.baselineHeight));
38132
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
38066
38133
  }
38067
38134
  else {
38068
- taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(this.baselineWidth), pixelToPoint(this.baselineHeight));
38135
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
38069
38136
  }
38137
+ renderedBaseline = true;
38070
38138
  }
38071
38139
  if (!this.isScheduledTask && this.unscheduledTaskBy === 'duration') {
38072
38140
  let brush1;
@@ -38287,6 +38355,15 @@ class PdfGanttTaskbarCollection {
38287
38355
  this.drawMilestone(page, startPoint, detail, cumulativeWidth);
38288
38356
  }
38289
38357
  }
38358
+ if (this.baselineEndDate >= detail.startDate && !renderedBaseline && detail.startIndex != 1 && this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
38359
+ const adjustHeight = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
38360
+ if (this.isAutoFit()) {
38361
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + (taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), (renderBaselineWidth), pixelToPoint(this.baselineHeight));
38362
+ }
38363
+ else {
38364
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, startPoint.x + pixelToPoint(taskbar.baselineLeft - cumulativeWidth) + 0.5, startPoint.y + adjustHeight + pixelToPoint(taskbar.height + 3), pixelToPoint(renderBaselineWidth), pixelToPoint(this.baselineHeight));
38365
+ }
38366
+ }
38290
38367
  this.drawRightLabel(page, startPoint, detail, cumulativeWidth);
38291
38368
  return isNextPage;
38292
38369
  }
@@ -39759,8 +39836,8 @@ class PdfExport {
39759
39836
  processExport(data, pdfExportProperties, isMultipleExport) {
39760
39837
  const section = this.pdfDocument.sections.add();
39761
39838
  this.processSectionExportProperties(section, pdfExportProperties);
39762
- const pdfPage = section.pages.add();
39763
- this.pdfPageDimensions = pdfPage.getClientSize();
39839
+ this.pdfPage = section.pages.add();
39840
+ this.pdfPageDimensions = this.pdfPage.getClientSize();
39764
39841
  /* eslint-disable-next-line */
39765
39842
  return new Promise((resolve, reject) => {
39766
39843
  this.helper.processGridExport(data, this.gantt, pdfExportProperties);
@@ -39769,7 +39846,7 @@ class PdfExport {
39769
39846
  }).then(() => {
39770
39847
  const format = new PdfTreeGridLayoutFormat();
39771
39848
  format.break = PdfLayoutBreakType.FitElement;
39772
- const layouter = this.gantt.drawGrid(pdfPage, 0, 0, format);
39849
+ const layouter = this.gantt.drawGrid(this.pdfPage, 0, 0, format);
39773
39850
  this.gantt.drawChart(layouter);
39774
39851
  if (this.helper.exportProps && this.helper.exportProps.fitToWidthSettings && this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
39775
39852
  this.parent.zoomingProjectStartDate = this.helper.beforeSinglePageExport['zoomingProjectStartDate'];