@syncfusion/ej2-gantt 20.1.51 → 20.1.52

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.
@@ -12570,6 +12570,9 @@ let Gantt = class Gantt extends Component {
12570
12570
  }
12571
12571
  else {
12572
12572
  this.treeGrid.dataSource = this.flatData;
12573
+ if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
12574
+ this.treeGrid.dataBind();
12575
+ }
12573
12576
  }
12574
12577
  }
12575
12578
  else {
@@ -30526,7 +30529,10 @@ class PdfGanttTaskbarCollection {
30526
30529
  const progressFormat = new PdfStringFormat();
30527
30530
  progressFormat.lineAlignment = PdfVerticalAlignment.Middle;
30528
30531
  progressFormat.alignment = PdfTextAlignment.Right;
30532
+ let isLabelString = false;
30533
+ let updatedWidth;
30529
30534
  if (/^[a-zA-Z]/.test(this.taskLabel)) {
30535
+ isLabelString = true;
30530
30536
  progressFormat.alignment = PdfTextAlignment.Left;
30531
30537
  }
30532
30538
  let pageIndex = -1;
@@ -30553,7 +30559,11 @@ class PdfGanttTaskbarCollection {
30553
30559
  if (this.isScheduledTask) {
30554
30560
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
30555
30561
  if (!isNullOrUndefined(this.parent.labelSettings.taskLabel) && !isNullOrUndefined(this.taskLabel)) {
30556
- taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(this.progressWidth), pixelToPoint(this.height), progressFormat);
30562
+ updatedWidth = this.progressWidth;
30563
+ if (isLabelString) {
30564
+ updatedWidth = this.width;
30565
+ }
30566
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
30557
30567
  }
30558
30568
  }
30559
30569
  }
@@ -30568,7 +30578,9 @@ class PdfGanttTaskbarCollection {
30568
30578
  this.isStartPoint = true;
30569
30579
  }
30570
30580
  let renderWidth = 0;
30571
- this.width = this.width - (detail.totalWidth - (this.left - cumulativeWidth));
30581
+ if (!isLabelString) {
30582
+ this.width = this.width - (detail.totalWidth - (this.left - cumulativeWidth));
30583
+ }
30572
30584
  renderWidth = (detail.totalWidth - (this.left - cumulativeWidth));
30573
30585
  if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
30574
30586
  this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
@@ -30586,7 +30598,11 @@ class PdfGanttTaskbarCollection {
30586
30598
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
30587
30599
  this.progressWidth -= progressBoundsWidth;
30588
30600
  if (this.parent.labelSettings.taskLabel && !isNullOrUndefined(this.taskLabel)) {
30589
- taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight), pixelToPoint(progressBoundsWidth), pixelToPoint(this.height), progressFormat);
30601
+ updatedWidth = progressBoundsWidth;
30602
+ if (isLabelString) {
30603
+ updatedWidth = this.width;
30604
+ }
30605
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
30590
30606
  }
30591
30607
  }
30592
30608
  }
@@ -30604,7 +30620,11 @@ class PdfGanttTaskbarCollection {
30604
30620
  if (this.isScheduledTask) {
30605
30621
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
30606
30622
  if (!isNullOrUndefined(this.taskLabel)) {
30607
- taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(this.progressWidth), pixelToPoint(this.height), progressFormat);
30623
+ updatedWidth = this.progressWidth;
30624
+ if (isLabelString) {
30625
+ updatedWidth = this.width;
30626
+ }
30627
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
30608
30628
  }
30609
30629
  }
30610
30630
  this.isCompleted = true;
@@ -30629,7 +30649,11 @@ class PdfGanttTaskbarCollection {
30629
30649
  taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
30630
30650
  this.progressWidth -= progressBoundsWidth;
30631
30651
  if (!isNullOrUndefined(this.taskLabel)) {
30632
- taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(progressBoundsWidth), pixelToPoint(this.height), progressFormat);
30652
+ updatedWidth = progressBoundsWidth;
30653
+ if (isLabelString) {
30654
+ updatedWidth = this.width;
30655
+ }
30656
+ taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
30633
30657
  }
30634
30658
  }
30635
30659
  this.isCompleted = false;