@syncfusion/ej2-gantt 22.2.11 → 23.1.36

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 (127) hide show
  1. package/CHANGELOG.md +195 -163
  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 +1003 -292
  6. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es5.js +1040 -313
  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 +21 -21
  13. package/src/gantt/actions/cell-edit.js +4 -1
  14. package/src/gantt/actions/context-menu.js +4 -1
  15. package/src/gantt/actions/critical-path.d.ts +2 -0
  16. package/src/gantt/actions/critical-path.js +81 -59
  17. package/src/gantt/actions/dependency.d.ts +1 -0
  18. package/src/gantt/actions/dependency.js +43 -25
  19. package/src/gantt/actions/dialog-edit.js +27 -7
  20. package/src/gantt/actions/edit.d.ts +12 -1
  21. package/src/gantt/actions/edit.js +91 -10
  22. package/src/gantt/actions/filter.js +3 -0
  23. package/src/gantt/actions/pdf-export.d.ts +4 -1
  24. package/src/gantt/actions/pdf-export.js +36 -3
  25. package/src/gantt/actions/rowdragdrop.js +10 -2
  26. package/src/gantt/actions/selection.js +22 -5
  27. package/src/gantt/actions/taskbar-edit.js +51 -36
  28. package/src/gantt/actions/toolbar.js +8 -0
  29. package/src/gantt/base/date-processor.js +3 -3
  30. package/src/gantt/base/gantt-chart.d.ts +1 -0
  31. package/src/gantt/base/gantt-chart.js +79 -6
  32. package/src/gantt/base/gantt-model.d.ts +7 -0
  33. package/src/gantt/base/gantt.d.ts +6 -0
  34. package/src/gantt/base/gantt.js +83 -13
  35. package/src/gantt/base/interface.d.ts +14 -0
  36. package/src/gantt/base/task-processor.d.ts +4 -4
  37. package/src/gantt/base/task-processor.js +86 -36
  38. package/src/gantt/base/tree-grid.js +19 -10
  39. package/src/gantt/export/export-helper.d.ts +5 -1
  40. package/src/gantt/export/export-helper.js +152 -4
  41. package/src/gantt/export/pdf-base/pdf-grid-table.js +2 -2
  42. package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +8 -0
  43. package/src/gantt/export/pdf-base/treegrid-layouter.js +6 -1
  44. package/src/gantt/export/pdf-connector-line.js +3 -1
  45. package/src/gantt/export/pdf-gantt.js +6 -0
  46. package/src/gantt/export/pdf-taskbar.d.ts +13 -0
  47. package/src/gantt/export/pdf-taskbar.js +39 -5
  48. package/src/gantt/export/pdf-timeline.js +17 -8
  49. package/src/gantt/export/pdf-treegrid.js +3 -0
  50. package/src/gantt/models/task-fields-model.d.ts +7 -0
  51. package/src/gantt/models/task-fields.d.ts +6 -0
  52. package/src/gantt/models/task-fields.js +3 -0
  53. package/src/gantt/renderer/chart-rows.d.ts +1 -1
  54. package/src/gantt/renderer/chart-rows.js +39 -20
  55. package/src/gantt/renderer/connector-line.js +49 -9
  56. package/src/gantt/renderer/edit-tooltip.js +11 -7
  57. package/src/gantt/renderer/timeline.js +19 -9
  58. package/src/gantt/renderer/tooltip.js +37 -33
  59. package/styles/bootstrap-dark.css +44 -100
  60. package/styles/bootstrap.css +44 -100
  61. package/styles/bootstrap4.css +44 -100
  62. package/styles/bootstrap5-dark.css +44 -100
  63. package/styles/bootstrap5.css +44 -100
  64. package/styles/fabric-dark.css +44 -100
  65. package/styles/fabric.css +44 -100
  66. package/styles/fluent-dark.css +44 -100
  67. package/styles/fluent.css +44 -100
  68. package/styles/gantt/_layout.scss +44 -31
  69. package/styles/gantt/_theme.scss +104 -98
  70. package/styles/gantt/bootstrap-dark.css +44 -100
  71. package/styles/gantt/bootstrap-dark.scss +1 -1
  72. package/styles/gantt/bootstrap.css +44 -100
  73. package/styles/gantt/bootstrap.scss +1 -1
  74. package/styles/gantt/bootstrap4.css +44 -100
  75. package/styles/gantt/bootstrap4.scss +1 -1
  76. package/styles/gantt/bootstrap5-dark.css +44 -100
  77. package/styles/gantt/bootstrap5-dark.scss +1 -1
  78. package/styles/gantt/bootstrap5.css +44 -100
  79. package/styles/gantt/bootstrap5.scss +1 -1
  80. package/styles/gantt/fabric-dark.css +44 -100
  81. package/styles/gantt/fabric-dark.scss +1 -1
  82. package/styles/gantt/fabric.css +44 -100
  83. package/styles/gantt/fabric.scss +1 -1
  84. package/styles/gantt/fluent-dark.css +44 -100
  85. package/styles/gantt/fluent-dark.scss +1 -1
  86. package/styles/gantt/fluent.css +44 -100
  87. package/styles/gantt/fluent.scss +1 -1
  88. package/styles/gantt/highcontrast-light.css +40 -100
  89. package/styles/gantt/highcontrast-light.scss +1 -1
  90. package/styles/gantt/highcontrast.css +44 -100
  91. package/styles/gantt/highcontrast.scss +1 -1
  92. package/styles/gantt/icons/_bootstrap-dark.scss +4 -0
  93. package/styles/gantt/icons/_bootstrap.scss +4 -0
  94. package/styles/gantt/icons/_bootstrap4.scss +4 -0
  95. package/styles/gantt/icons/_bootstrap5.scss +4 -0
  96. package/styles/gantt/icons/_fabric-dark.scss +4 -0
  97. package/styles/gantt/icons/_fabric.scss +4 -0
  98. package/styles/gantt/icons/_fluent.scss +4 -0
  99. package/styles/gantt/icons/_fusionnew.scss +4 -0
  100. package/styles/gantt/icons/_highcontrast.scss +4 -0
  101. package/styles/gantt/icons/_material-dark.scss +4 -0
  102. package/styles/gantt/icons/_material.scss +4 -0
  103. package/styles/gantt/icons/_material3.scss +4 -0
  104. package/styles/gantt/icons/_tailwind-dark.scss +4 -0
  105. package/styles/gantt/icons/_tailwind.scss +4 -0
  106. package/styles/gantt/material-dark.css +44 -101
  107. package/styles/gantt/material-dark.scss +1 -1
  108. package/styles/gantt/material.css +44 -101
  109. package/styles/gantt/material.scss +1 -1
  110. package/styles/gantt/material3-dark.css +45 -102
  111. package/styles/gantt/material3-dark.scss +1 -1
  112. package/styles/gantt/material3.css +45 -102
  113. package/styles/gantt/material3.scss +1 -1
  114. package/styles/gantt/tailwind-dark.css +44 -101
  115. package/styles/gantt/tailwind-dark.scss +1 -1
  116. package/styles/gantt/tailwind.css +44 -101
  117. package/styles/gantt/tailwind.scss +1 -1
  118. package/styles/highcontrast-light.css +40 -100
  119. package/styles/highcontrast.css +44 -100
  120. package/styles/material-dark.css +44 -101
  121. package/styles/material.css +44 -101
  122. package/styles/material3-dark.css +45 -102
  123. package/styles/material3-dark.scss +1 -1
  124. package/styles/material3.css +45 -102
  125. package/styles/material3.scss +1 -1
  126. package/styles/tailwind-dark.css +44 -101
  127. package/styles/tailwind.css +44 -101
@@ -16,6 +16,7 @@ import { PdfBorders, TemporaryDictionary } from './index';
16
16
  import { PdfHorizontalOverflowType } from '../../base/interface';
17
17
  import { ElementLayouter, PdfLayoutResult, PdfLayoutFormat, SizeF, PointF, RectangleF, RowLayoutResult, PdfLayoutType, PdfLayoutBreakType } from '@syncfusion/ej2-pdf-export';
18
18
  import { PdfStringFormat } from '@syncfusion/ej2-pdf-export';
19
+ import { pointToPixel } from '../../base/utils';
19
20
  /**
20
21
  *
21
22
  */
@@ -83,7 +84,7 @@ var PdfTreeGridLayouter = /** @class */ (function (_super) {
83
84
  var startColumn = 0;
84
85
  var endColumn = 0;
85
86
  var cellWidths = 0;
86
- var availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;
87
+ var availableWidth = pointToPixel(this.currentGraphics.clientSize.width) - this.currentBounds.x;
87
88
  for (var i = 0; i < this.treegrid.columns.count; i++) {
88
89
  cellWidths += this.treegrid.columns.getColumn(i).width;
89
90
  if (cellWidths >= availableWidth) {
@@ -309,6 +310,10 @@ var PdfTreeGridLayouter = /** @class */ (function (_super) {
309
310
  }
310
311
  }
311
312
  var size = new SizeF(column.width, height);
313
+ if (cell.columnSpan > 1) {
314
+ size = new SizeF(cell.width, height);
315
+ i += cell.columnSpan;
316
+ }
312
317
  if (!this.checkIfDefaultFormat(column.format) && this.checkIfDefaultFormat(cell.style.format)) {
313
318
  cell.style.format = column.format;
314
319
  }
@@ -163,7 +163,9 @@ var PdfGanttPredecessor = /** @class */ (function () {
163
163
  }
164
164
  break;
165
165
  }
166
- var midPoint = Math.round((this.parent.rowHeight - 1) / 2.0);
166
+ var midPointforTaskbar = Math.round((this.parent.rowHeight - 1) / 2.0);
167
+ var midPointforBaseline = Math.round((this.parent.rowHeight - 10) / 2.0);
168
+ var midPoint = this.parent.renderBaseline ? midPointforBaseline : midPointforTaskbar;
167
169
  midPoint = pixelToPoint(midPoint);
168
170
  /* eslint-disable-next-line */
169
171
  var point1, point2, point3, point4, point5, point6;
@@ -221,6 +221,7 @@ var PdfGantt = /** @class */ (function (_super) {
221
221
  var pageData;
222
222
  this.headerDetails.forEach(function (detail, index) {
223
223
  var page = _this.result.page.section.getPages()[_this.startPageIndex];
224
+ page['contentWidth'] = pointToPixel(_this.headerDetails[index].endPoint - _this.headerDetails[index].startPoint);
224
225
  _this.chartHeader.drawTimeline(page, _this.startPoint, detail);
225
226
  taskbarPoint.y = taskbarPoint.y + pixelToPoint(_this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
226
227
  pageStartX = taskbarPoint.x;
@@ -231,6 +232,11 @@ var PdfGantt = /** @class */ (function (_super) {
231
232
  var task = _this.taskbarCollection[i];
232
233
  var rowHeight = _this.rows.getRow(i + 1).height;
233
234
  var pdfPage = _this.result.page.section.getPages()[_this.startPageIndex];
235
+ var graphics = pdfPage.graphics;
236
+ var pen = new PdfPen(new PdfColor(206, 206, 206));
237
+ if (page['contentWidth'] && (_this.parent.gridLines == "Both" || _this.parent.gridLines == "Horizontal")) {
238
+ graphics.drawRectangle(pen, pageStartX, taskbarPoint.y, page['contentWidth'] + 0.5, rowHeight);
239
+ }
234
240
  /* eslint-disable-next-line */
235
241
  var isNextPage = task.drawTaskbar(pdfPage, taskbarPoint, detail, cumulativeWidth, rowHeight, _this.taskbarCollection[i]);
236
242
  if (isNextPage) {
@@ -14,6 +14,16 @@ export declare class PdfGanttTaskbarCollection {
14
14
  isAutoSchedule?: boolean;
15
15
  /** Defines the task is milestone or not. */
16
16
  isMilestone?: boolean;
17
+ /** Defines the task baselinestartdate. */
18
+ baselineStartDate?: Date;
19
+ /** Defines the task baselineenddate. */
20
+ baselineEndDate?: Date;
21
+ /** Defines the task baselineleft. */
22
+ baselineLeft?: number;
23
+ /** Defines the task baselinewidth. */
24
+ baselineWidth?: number;
25
+ /** Defines the task baselineHeight . */
26
+ baselineHeight: number;
17
27
  /** Defines the left of task.
18
28
  *
19
29
  * @hidden
@@ -58,6 +68,9 @@ export declare class PdfGanttTaskbarCollection {
58
68
  gridLineColor: PdfColor;
59
69
  progressFontColor: PdfColor;
60
70
  taskColor: PdfColor;
71
+ baselineColor: PdfColor;
72
+ baselineBorderColor: PdfColor;
73
+ baselineTop: number;
61
74
  labelColor: PdfColor;
62
75
  taskBorderColor: PdfColor;
63
76
  progressColor: PdfColor;
@@ -9,14 +9,16 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { PointF, PdfStringLayouter, PdfPen, PdfSolidBrush, RectangleF, SizeF, PdfStandardFont, PdfFontStyle, PdfStringFormat, PdfVerticalAlignment, PdfTextAlignment, PdfWordWrapType } from '@syncfusion/ej2-pdf-export';
13
- import { pixelToPoint } from '../base/utils';
12
+ import { PointF, PdfColor, PdfStringLayouter, PdfPen, PdfSolidBrush, RectangleF, SizeF, PdfStandardFont, PdfFontStyle, PdfStringFormat, PdfVerticalAlignment, PdfTextAlignment, PdfWordWrapType } from '@syncfusion/ej2-pdf-export';
13
+ import { pixelToPoint, pointToPixel } from '../base/utils';
14
14
  import { isNullOrUndefined } from '@syncfusion/ej2-base';
15
15
  /**
16
16
  * @hidden
17
17
  */
18
18
  var PdfGanttTaskbarCollection = /** @class */ (function () {
19
19
  function PdfGanttTaskbarCollection(parent) {
20
+ /** Defines the task baselineHeight . */
21
+ this.baselineHeight = 8;
20
22
  /**
21
23
  * @private
22
24
  */
@@ -63,6 +65,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
63
65
  //code for while current pdf page is exceed
64
66
  if (yPoint > pageSize.height) {
65
67
  page = this.GetNextPage(page);
68
+ page['contentWidth'] = pointToPixel(detail.endPoint - detail.startPoint);
66
69
  taskGraphics = page.graphics;
67
70
  startPoint.y = 0;
68
71
  if (this.parent.pdfExportModule.gantt.enableHeader) {
@@ -70,6 +73,11 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
70
73
  startPoint.y = pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60);
71
74
  }
72
75
  isNextPage = true;
76
+ var graphics = page.graphics;
77
+ var pen = new PdfPen(new PdfColor(206, 206, 206));
78
+ if (page['contentWidth'] && (this.parent.gridLines == "Both" || this.parent.gridLines == "Horizontal")) {
79
+ graphics.drawRectangle(pen, startPoint.x, startPoint.y, page['contentWidth'] + 0.5, rowHeight);
80
+ }
73
81
  }
74
82
  this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
75
83
  //Draw Taskbar
@@ -93,9 +101,13 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
93
101
  if (!taskbar.isMilestone) {
94
102
  var taskbarPen = new PdfPen(taskbar.taskBorderColor);
95
103
  var taskBrush = new PdfSolidBrush(taskbar.taskColor);
104
+ var baselinePen = new PdfPen(taskbar.baselineBorderColor);
105
+ var baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
96
106
  var progressPen = new PdfPen(taskbar.progressColor);
97
107
  var progressBrush = new PdfSolidBrush(taskbar.progressColor);
98
- var adjustHeight = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
108
+ var adjustHeightforTaskbar = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
109
+ var adjustHeightforBaseline = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
110
+ var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaseline : adjustHeightforTaskbar;
99
111
  pageIndex = page.section.indexOf(page);
100
112
  var startDate = isNullOrUndefined(this.unscheduleStarteDate) ? this.startDate : this.unscheduleStarteDate;
101
113
  var endDate = isNullOrUndefined(this.unscheduleEndDate) ? this.endDate : this.unscheduleEndDate;
@@ -109,6 +121,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
109
121
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
110
122
  }
111
123
  else {
124
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
125
+ 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));
126
+ }
112
127
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
113
128
  if (this.isScheduledTask) {
114
129
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
@@ -140,6 +155,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
140
155
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
141
156
  }
142
157
  else {
158
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
159
+ 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));
160
+ }
143
161
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
144
162
  taskbar.width = taskbar.width - renderWidth;
145
163
  if (this.isScheduledTask) {
@@ -171,6 +189,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
171
189
  this.taskStartPoint = __assign({}, startPoint);
172
190
  this.isStartPoint = true;
173
191
  }
192
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
193
+ 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));
194
+ }
174
195
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
175
196
  if (this.isScheduledTask) {
176
197
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
@@ -192,6 +213,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
192
213
  this.taskStartPoint = __assign({}, startPoint);
193
214
  this.isStartPoint = true;
194
215
  }
216
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
217
+ 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));
218
+ }
195
219
  taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
196
220
  if (this.isScheduledTask) {
197
221
  var progressBoundsWidth = 0;
@@ -217,6 +241,9 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
217
241
  }
218
242
  else {
219
243
  this.drawMilestone(page, startPoint, detail, cumulativeWidth);
244
+ if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
245
+ this.drawMilestone(page, startPoint, detail, cumulativeWidth);
246
+ }
220
247
  }
221
248
  this.drawRightLabel(page, startPoint, detail, cumulativeWidth);
222
249
  return isNextPage;
@@ -375,13 +402,20 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
375
402
  var pageIndex = page.section.indexOf(page);
376
403
  this.taskStartPoint = __assign({}, startPoint);
377
404
  var milestonePen = new PdfPen(this.milestoneColor);
378
- var adjustHeight = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
405
+ var adjustHeightforBaselineMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 3.0));
406
+ var adjustHeightforMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
407
+ var adjustHeight = this.parent.renderBaseline ? adjustHeightforBaselineMilesone : adjustHeightforMilesone;
379
408
  var milestoneBrush = new PdfSolidBrush(this.milestoneColor);
409
+ var baselinePen = new PdfPen(this.baselineBorderColor);
410
+ var baselineBrush = new PdfSolidBrush(this.baselineColor);
380
411
  taskGraphics.save(); //saving graphics state
381
- var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.6);
412
+ var height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.8);
382
413
  /* eslint-disable-next-line */
383
414
  taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
384
415
  taskGraphics.rotateTransform(45); //apply rotation
416
+ if (this.parent.renderBaseline && this.baselineStartDate && this.baselineEndDate) {
417
+ taskGraphics.drawRectangle(baselinePen, baselineBrush, 2, 2, pixelToPoint(height), pixelToPoint(height));
418
+ }
385
419
  taskGraphics.drawRectangle(milestonePen, milestoneBrush, 0, 0, pixelToPoint(height), pixelToPoint(height));
386
420
  taskGraphics.restore(); //restoring graphics state
387
421
  this.endPage = this.startPage = pageIndex;
@@ -1,6 +1,6 @@
1
1
  import { PointF, PdfColor, PdfPen, PdfSolidBrush, PdfStandardFont, PdfStringFormat, PdfVerticalAlignment, PdfTextAlignment, PdfWordWrapType } from '@syncfusion/ej2-pdf-export';
2
2
  import { extend, isNullOrUndefined } from '@syncfusion/ej2-base';
3
- import { pixelToPoint } from '../base/utils';
3
+ import { pixelToPoint, pointToPixel } from '../base/utils';
4
4
  /**
5
5
  */
6
6
  var PdfTimeline = /** @class */ (function () {
@@ -23,7 +23,7 @@ var PdfTimeline = /** @class */ (function () {
23
23
  * @returns {void}
24
24
  */
25
25
  PdfTimeline.prototype.drawTimeline = function (page, startPoint, detail) {
26
- var remainWidth = Math.floor(detail.totalWidth);
26
+ var remainWidth = pointToPixel(Math.floor(detail.totalWidth));
27
27
  var renderWidth = 0;
28
28
  this.topTierPoint.x = startPoint.x;
29
29
  this.topTierPoint.y = startPoint.y;
@@ -51,7 +51,7 @@ var PdfTimeline = /** @class */ (function () {
51
51
  //Primary header Event Arguments
52
52
  /* eslint-disable-next-line */
53
53
  this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
54
- this.topTierPoint.x += pixelToPoint(renderWidth);
54
+ this.topTierPoint.x += renderWidth;
55
55
  remainWidth -= renderWidth;
56
56
  if (isCompleted) {
57
57
  this.topTierIndex++;
@@ -77,7 +77,7 @@ var PdfTimeline = /** @class */ (function () {
77
77
  //Secondary header Event Arguments
78
78
  /* eslint-disable-next-line */
79
79
  this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
80
- this.bottomTierPoint.x = this.bottomTierPoint.x + pixelToPoint(width);
80
+ this.bottomTierPoint.x = this.bottomTierPoint.x + width;
81
81
  remainWidth -= width;
82
82
  secondHeader.completedWidth = width;
83
83
  if (isCompleted) {
@@ -108,7 +108,7 @@ var PdfTimeline = /** @class */ (function () {
108
108
  //Primary header Event Arguments
109
109
  /* eslint-disable-next-line */
110
110
  this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
111
- this.topTierPoint.x += pixelToPoint(pHeader.completedWidth);
111
+ this.topTierPoint.x += pHeader.completedWidth;
112
112
  }
113
113
  }
114
114
  }
@@ -121,7 +121,7 @@ var PdfTimeline = /** @class */ (function () {
121
121
  //Secondary header Event Arguments
122
122
  /* eslint-disable-next-line */
123
123
  this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, secondHeader.width, secondHeader.value, false);
124
- this.bottomTierPoint.x = this.bottomTierPoint.x + pixelToPoint(secondHeader.width);
124
+ this.bottomTierPoint.x = this.bottomTierPoint.x + secondHeader.width;
125
125
  }
126
126
  }
127
127
  }
@@ -168,7 +168,10 @@ var PdfTimeline = /** @class */ (function () {
168
168
  var e = eventArgs.timelineCell;
169
169
  var rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
170
170
  var rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
171
- graphics.drawRectangle(rectPen, rectBrush, x, y, pixelToPoint(width), pixelToPoint(height));
171
+ graphics.drawRectangle(rectPen, rectBrush, x, y, width, pixelToPoint(height));
172
+ if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
173
+ graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
174
+ }
172
175
  var font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
173
176
  if (ganttStyle.font) {
174
177
  font = ganttStyle.font;
@@ -177,7 +180,13 @@ var PdfTimeline = /** @class */ (function () {
177
180
  var pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
178
181
  var pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
179
182
  /* eslint-disable-next-line */
180
- graphics.drawString(eventArgs.value, font, null, textBrush, x + pLeft, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
183
+ if (isTopTier) {
184
+ x = x + pLeft + 4;
185
+ }
186
+ else {
187
+ x = x + pLeft;
188
+ }
189
+ graphics.drawString(eventArgs.value, font, null, textBrush, x, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
181
190
  };
182
191
  return PdfTimeline;
183
192
  }());
@@ -267,12 +267,15 @@ var PdfTreeGrid = /** @class */ (function (_super) {
267
267
  colSpan = cell.columnSpan;
268
268
  currentCellIndex = j;
269
269
  cell.isCellMergeStart = true;
270
+ var totalColumnWidth = this.columns.columns[currentCellIndex].width;
270
271
  //Set Column merges.
271
272
  while (colSpan > 1) {
272
273
  currentCellIndex++;
273
274
  row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
274
275
  colSpan--;
276
+ totalColumnWidth += this.columns.columns[currentCellIndex].width;
275
277
  }
278
+ cell.width = totalColumnWidth;
276
279
  }
277
280
  else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
278
281
  rowSpan = cell.rowSpan;
@@ -26,6 +26,13 @@ export interface TaskFieldsModel {
26
26
  */
27
27
  parentID?: string;
28
28
 
29
+ /**
30
+ * Gets or sets a field name of data object in data source that specifies whether the current record has child records.
31
+ *
32
+ * @default null
33
+ */
34
+ hasChildMapping?: string;
35
+
29
36
  /**
30
37
  * To map start date of task from data source.
31
38
  *
@@ -21,6 +21,12 @@ export declare class TaskFields extends ChildProperty<TaskFields> {
21
21
  * @default null
22
22
  */
23
23
  parentID: string;
24
+ /**
25
+ * Gets or sets a field name of data object in data source that specifies whether the current record has child records.
26
+ *
27
+ * @default null
28
+ */
29
+ hasChildMapping: string;
24
30
  /**
25
31
  * To map start date of task from data source.
26
32
  *
@@ -35,6 +35,9 @@ var TaskFields = /** @class */ (function (_super) {
35
35
  __decorate([
36
36
  Property(null)
37
37
  ], TaskFields.prototype, "parentID", void 0);
38
+ __decorate([
39
+ Property(null)
40
+ ], TaskFields.prototype, "hasChildMapping", void 0);
38
41
  __decorate([
39
42
  Property(null)
40
43
  ], TaskFields.prototype, "startDate", void 0);
@@ -11,7 +11,7 @@ export declare class ChartRows extends DateProcessor {
11
11
  taskBarHeight: number;
12
12
  milestoneHeight: number;
13
13
  private milesStoneRadius;
14
- private baselineTop;
14
+ baselineTop: number;
15
15
  baselineHeight: number;
16
16
  private baselineColor;
17
17
  private parentTaskbarTemplateFunction;
@@ -305,16 +305,16 @@ var ChartRows = /** @class */ (function (_super) {
305
305
  return splitTasks;
306
306
  };
307
307
  ChartRows.prototype.getSplitTaskbarLeftResizerNode = function () {
308
- var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
308
+ var lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
309
309
  var template = '<div class="' + cls.taskBarLeftResizer + ' ' + cls.icon + '"' +
310
- ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
310
+ ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
311
311
  return template;
312
312
  };
313
313
  ChartRows.prototype.getSplitTaskbarRightResizerNode = function (segment) {
314
- var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
314
+ var rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
315
315
  var template = '<div class="' + cls.taskBarRightResizer + ' ' + cls.icon + '"' +
316
316
  ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (segment.width + rResizerLeft) + 'px;' +
317
- 'height:' + (this.taskBarHeight) + 'px;"></div>';
317
+ 'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
318
318
  return template;
319
319
  };
320
320
  ChartRows.prototype.getSplitProgressResizerNode = function (segment) {
@@ -639,7 +639,7 @@ var ChartRows = /** @class */ (function (_super) {
639
639
  }
640
640
  else {
641
641
  var template = '<div class="' + cls.traceMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;height:' +
642
- ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);top:' + (this.parent.rowHeight > 40 ? 0 : 1) + 'px;left:' + 1 + 'px;"> </div>';
642
+ ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);left:' + 1 + 'px;"> </div>';
643
643
  milestoneNode = this.createDivElement(template);
644
644
  }
645
645
  return milestoneNode;
@@ -1017,16 +1017,16 @@ var ChartRows = /** @class */ (function (_super) {
1017
1017
  return this.createDivElement(template);
1018
1018
  };
1019
1019
  ChartRows.prototype.childTaskbarLeftResizer = function () {
1020
- var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
1020
+ var lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
1021
1021
  var template = '<div class="' + cls.taskBarLeftResizer + ' ' + cls.icon + '"' +
1022
- 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
1022
+ 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
1023
1023
  return this.createDivElement(template);
1024
1024
  };
1025
1025
  ChartRows.prototype.childTaskbarRightResizer = function () {
1026
- var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
1026
+ var rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
1027
1027
  var template = '<div class="' + cls.taskBarRightResizer + ' ' + cls.icon + '"' +
1028
1028
  'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
1029
- 'height:' + (this.taskBarHeight) + 'px;"></div>';
1029
+ 'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
1030
1030
  return this.createDivElement(template);
1031
1031
  };
1032
1032
  ChartRows.prototype.childTaskbarProgressResizer = function () {
@@ -1040,8 +1040,10 @@ var ChartRows = /** @class */ (function (_super) {
1040
1040
  };
1041
1041
  ChartRows.prototype.getLeftPointNode = function () {
1042
1042
  var data = this.templateData;
1043
- var pointerLeft = -((this.parent.isAdaptive ? 14 : 2) + this.connectorPointWidth);
1044
- var mileStoneLeft = -(this.connectorPointWidth + 2);
1043
+ var left = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 12 : 0;
1044
+ var mileStoneLeftValue = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 6 : 3;
1045
+ var pointerLeft = -(3 + this.connectorPointWidth + left);
1046
+ var mileStoneLeft = -(this.connectorPointWidth + 4 + mileStoneLeftValue);
1045
1047
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
1046
1048
  var marginTop;
1047
1049
  if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
@@ -1060,7 +1062,8 @@ var ChartRows = /** @class */ (function (_super) {
1060
1062
  };
1061
1063
  ChartRows.prototype.getRightPointNode = function () {
1062
1064
  var data = this.templateData;
1063
- var pointerRight = this.parent.isAdaptive ? 10 : -2;
1065
+ var right = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -12 : 0;
1066
+ var pointerRight = -(3 + right);
1064
1067
  var pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
1065
1068
  var marginTop;
1066
1069
  if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
@@ -1070,7 +1073,7 @@ var ChartRows = /** @class */ (function (_super) {
1070
1073
  marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
1071
1074
  }
1072
1075
  var template = '<div class="' + cls.rightConnectorPointOuterDiv + '" style="' +
1073
- ((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
1076
+ ((data.ganttProperties.isMilestone) ? ('left:' + ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.milestoneHeight + 5) : this.milestoneHeight - 2) + 'px;margin-top:' +
1074
1077
  pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
1075
1078
  '<div class="' + cls.connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
1076
1079
  '" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
@@ -1243,7 +1246,7 @@ var ChartRows = /** @class */ (function (_super) {
1243
1246
  * @private
1244
1247
  */
1245
1248
  ChartRows.prototype.initChartHelperPrivateVariable = function () {
1246
- var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
1249
+ var taskbarHeightValue = this.parent.renderBaseline ? 0.45 : ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 0.7 : 0.62);
1247
1250
  var taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
1248
1251
  var milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
1249
1252
  this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
@@ -1265,8 +1268,8 @@ var ChartRows = /** @class */ (function (_super) {
1265
1268
  this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
1266
1269
  this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
1267
1270
  this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
1268
- this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 10;
1269
- this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2)) - 1;
1271
+ this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
1272
+ this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
1270
1273
  };
1271
1274
  /**
1272
1275
  * Function used to refresh Gantt rows.
@@ -1552,11 +1555,24 @@ var ChartRows = /** @class */ (function (_super) {
1552
1555
  * @private
1553
1556
  */
1554
1557
  ChartRows.prototype.setAriaRowIndex = function (tempTemplateData, tRow) {
1558
+ var _this = this;
1555
1559
  var dataSource = this.parent.treeGrid.getCurrentViewRecords();
1556
1560
  var visualData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
1557
1561
  getValue('virtualScrollModule.visualData', this.parent.treeGrid) : dataSource;
1558
- var index = visualData.indexOf(tempTemplateData);
1559
- tRow.setAttribute('aria-rowindex', index.toString());
1562
+ var index;
1563
+ if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
1564
+ var gridData = this.parent.treeGrid.grid.contentModule['rows'];
1565
+ var data = gridData.filter(function (x) {
1566
+ if (x['data'][_this.parent.taskFields.id] === tempTemplateData.ganttProperties.taskId) {
1567
+ return x;
1568
+ }
1569
+ })[0];
1570
+ tRow.setAttribute('aria-rowindex', data['index'].toString());
1571
+ }
1572
+ else {
1573
+ index = visualData.indexOf(tempTemplateData);
1574
+ tRow.setAttribute('aria-rowindex', index.toString());
1575
+ }
1560
1576
  };
1561
1577
  /**
1562
1578
  * To trigger query taskbar info event.
@@ -1932,8 +1948,11 @@ var ChartRows = /** @class */ (function (_super) {
1932
1948
  this.triggerQueryTaskbarInfoByIndex(tr, data);
1933
1949
  }
1934
1950
  var dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
1935
- this.parent.treeGrid.grid.setRowData(dataId, data);
1936
- if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap) {
1951
+ if (!this.parent.ganttChartModule.isExpandAll && !this.parent.ganttChartModule.isCollapseAll) {
1952
+ this.parent.treeGrid.grid.setRowData(dataId, data);
1953
+ }
1954
+ if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap &&
1955
+ !this.parent.ganttChartModule.isCollapseAll && !this.parent.ganttChartModule.isExpandAll) {
1937
1956
  this.updateDragDropRecords(selectedItem, tr);
1938
1957
  }
1939
1958
  if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
@@ -57,7 +57,7 @@ var ConnectorLine = /** @class */ (function () {
57
57
  };
58
58
  ConnectorLine.prototype.getTaskbarMidpoint = function (isMilestone) {
59
59
  return Math.floor(isMilestone ?
60
- (this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2)) + 1 :
60
+ (this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2)) :
61
61
  (this.parent.chartRowsModule.taskBarMarginTop + (this.parent.chartRowsModule.taskBarHeight / 2))) + 1;
62
62
  };
63
63
  /**
@@ -71,14 +71,45 @@ var ConnectorLine = /** @class */ (function () {
71
71
  */
72
72
  ConnectorLine.prototype.createConnectorLineObject = function (parentGanttData, childGanttData, predecessor) {
73
73
  var connectorObj = {};
74
- var updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
75
- this.parent.flatData : this.expandedRecords;
76
- var parentIndex = updatedRecords.indexOf(parentGanttData);
77
- var childIndex = updatedRecords.indexOf(childGanttData);
74
+ var updatedRecords;
75
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
76
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
77
+ updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
78
+ this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.expandedRecords;
79
+ }
80
+ else {
81
+ updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
82
+ this.parent.flatData : this.expandedRecords;
83
+ }
84
+ var parentIndex;
85
+ var childIndex;
86
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
87
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
88
+ var parentData = this.parent.flatData.filter(function (data) {
89
+ return data.ganttProperties.taskId.toString() == parentGanttData.ganttProperties.taskId.toString();
90
+ })[0];
91
+ var childData = this.parent.flatData.filter(function (data) {
92
+ return data.ganttProperties.taskId.toString() == childGanttData.ganttProperties.taskId.toString();
93
+ })[0];
94
+ parentIndex = parentData.index;
95
+ childIndex = childData.index;
96
+ }
97
+ else {
98
+ parentIndex = updatedRecords.indexOf(parentGanttData);
99
+ childIndex = updatedRecords.indexOf(childGanttData);
100
+ }
78
101
  var parentGanttRecord = parentGanttData.ganttProperties;
79
102
  var childGanttRecord = childGanttData.ganttProperties;
80
- var currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
81
- this.parent.currentViewData : this.parent.getExpandedRecords(this.parent.currentViewData);
103
+ var currentData;
104
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
105
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
106
+ currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
107
+ this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
108
+ }
109
+ else {
110
+ currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
111
+ this.parent.currentViewData : this.parent.getExpandedRecords(this.parent.currentViewData);
112
+ }
82
113
  connectorObj.parentIndexInCurrentView = currentData.indexOf(parentGanttData);
83
114
  connectorObj.childIndexInCurrentView = currentData.indexOf(childGanttData);
84
115
  var isVirtualScroll = this.parent.virtualScrollModule && this.parent.enableVirtualization;
@@ -864,8 +895,17 @@ var ConnectorLine = /** @class */ (function () {
864
895
  if (isNullOrUndefined(id)) {
865
896
  return null;
866
897
  }
867
- return this.parent.viewType === 'ResourceView' ? this.parent.flatData[this.parent.getTaskIds().indexOf('T' + id.toString())] :
868
- this.parent.flatData[this.parent.ids.indexOf(id.toString())];
898
+ if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
899
+ this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
900
+ var a = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'].filter(function (data) {
901
+ return data.ganttProperties.taskId.toString() === id.toString();
902
+ })[0];
903
+ return a;
904
+ }
905
+ else {
906
+ return this.parent.viewType === 'ResourceView' ? this.parent.flatData[this.parent.getTaskIds().indexOf('T' + id.toString())] :
907
+ this.parent.flatData[this.parent.ids.indexOf(id.toString())];
908
+ }
869
909
  };
870
910
  /**
871
911
  * Method to remove connector line from DOM
@@ -50,14 +50,18 @@ var EditTooltip = /** @class */ (function () {
50
50
  * @returns {void} .
51
51
  */
52
52
  EditTooltip.prototype.updateTooltipPosition = function (args) {
53
- // const containerPosition: { top: number, left: number } = this.parent.getOffsetRect(this.parent.chartPane);
54
- // const leftEnd: number = containerPosition.left + this.parent.chartPane.offsetWidth;
55
- // let tooltipPositionX: number = args.element.offsetLeft;
56
- // if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
57
- // tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
58
- // }
59
- // args.element.style.left = tooltipPositionX + 'px';
60
53
  args.element.style.visibility = 'visible';
54
+ var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
55
+ if (isNullOrUndefined(parentWithZoomStyle)) {
56
+ var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
57
+ var leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
58
+ var tooltipPositionX = args.element.offsetLeft;
59
+ if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
60
+ tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
61
+ }
62
+ args.element.style.left = tooltipPositionX + 'px';
63
+ args.element.style.visibility = 'visible';
64
+ }
61
65
  };
62
66
  /**
63
67
  * To show/hide taskbar edit tooltip.