@syncfusion/ej2-gantt 20.3.61 → 20.4.40

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 (107) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +64 -52
  4. package/dist/ej2-gantt.min.js +2 -2
  5. package/dist/ej2-gantt.umd.min.js +2 -2
  6. package/dist/ej2-gantt.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-gantt.es2015.js +1522 -511
  8. package/dist/es6/ej2-gantt.es2015.js.map +1 -1
  9. package/dist/es6/ej2-gantt.es5.js +1548 -519
  10. package/dist/es6/ej2-gantt.es5.js.map +1 -1
  11. package/dist/global/ej2-gantt.min.js +2 -2
  12. package/dist/global/ej2-gantt.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +21 -23
  15. package/src/gantt/actions/chart-scroll.d.ts +5 -1
  16. package/src/gantt/actions/chart-scroll.js +39 -1
  17. package/src/gantt/actions/connector-line-edit.js +2 -0
  18. package/src/gantt/actions/context-menu.js +36 -5
  19. package/src/gantt/actions/critical-path.d.ts +2 -2
  20. package/src/gantt/actions/critical-path.js +23 -16
  21. package/src/gantt/actions/dependency.js +5 -2
  22. package/src/gantt/actions/dialog-edit.js +37 -14
  23. package/src/gantt/actions/edit.d.ts +1 -0
  24. package/src/gantt/actions/edit.js +156 -34
  25. package/src/gantt/actions/excel-export.js +13 -0
  26. package/src/gantt/actions/filter.js +3 -0
  27. package/src/gantt/actions/keyboard.js +1 -0
  28. package/src/gantt/actions/pdf-export.js +12 -0
  29. package/src/gantt/actions/rowdragdrop.js +8 -2
  30. package/src/gantt/actions/taskbar-edit.js +140 -43
  31. package/src/gantt/actions/toolbar.js +21 -1
  32. package/src/gantt/base/date-processor.js +1 -1
  33. package/src/gantt/base/gantt-chart.js +31 -3
  34. package/src/gantt/base/gantt-model.d.ts +25 -2
  35. package/src/gantt/base/gantt.d.ts +64 -21
  36. package/src/gantt/base/gantt.js +405 -29
  37. package/src/gantt/base/interface.d.ts +0 -4
  38. package/src/gantt/base/splitter.js +12 -2
  39. package/src/gantt/base/task-processor.js +21 -6
  40. package/src/gantt/base/tree-grid.js +37 -0
  41. package/src/gantt/base/utils.js +1 -0
  42. package/src/gantt/export/pdf-connector-line.js +185 -187
  43. package/src/gantt/models/loading-indicator-model.d.ts +20 -0
  44. package/src/gantt/models/loading-indicator.d.ts +18 -0
  45. package/src/gantt/models/loading-indicator.js +34 -0
  46. package/src/gantt/models/models.d.ts +2 -0
  47. package/src/gantt/models/models.js +1 -0
  48. package/src/gantt/renderer/chart-rows.js +153 -56
  49. package/src/gantt/renderer/connector-line.js +100 -97
  50. package/src/gantt/renderer/edit-tooltip.js +22 -3
  51. package/src/gantt/renderer/event-marker.js +15 -2
  52. package/src/gantt/renderer/nonworking-day.js +4 -2
  53. package/src/gantt/renderer/timeline.js +22 -2
  54. package/src/gantt/renderer/tooltip.js +1 -0
  55. package/styles/bootstrap-dark.css +179 -12
  56. package/styles/bootstrap.css +179 -12
  57. package/styles/bootstrap4.css +179 -11
  58. package/styles/bootstrap5-dark.css +178 -10
  59. package/styles/bootstrap5.css +178 -10
  60. package/styles/fabric-dark.css +179 -12
  61. package/styles/fabric.css +179 -12
  62. package/styles/fluent-dark.css +180 -10
  63. package/styles/fluent.css +180 -10
  64. package/styles/gantt/_bootstrap-dark-definition.scss +6 -2
  65. package/styles/gantt/_bootstrap-definition.scss +6 -3
  66. package/styles/gantt/_bootstrap4-definition.scss +6 -3
  67. package/styles/gantt/_bootstrap5-definition.scss +6 -3
  68. package/styles/gantt/_fabric-dark-definition.scss +6 -3
  69. package/styles/gantt/_fabric-definition.scss +6 -3
  70. package/styles/gantt/_fluent-definition.scss +6 -3
  71. package/styles/gantt/_fusionnew-definition.scss +6 -3
  72. package/styles/gantt/_highcontrast-definition.scss +7 -4
  73. package/styles/gantt/_highcontrast-light-definition.scss +6 -3
  74. package/styles/gantt/_layout.scss +234 -21
  75. package/styles/gantt/_material-dark-definition.scss +6 -3
  76. package/styles/gantt/_material-definition.scss +6 -3
  77. package/styles/gantt/_material3-definition.scss +6 -3
  78. package/styles/gantt/_tailwind-definition.scss +6 -3
  79. package/styles/gantt/_theme.scss +17 -8
  80. package/styles/gantt/bootstrap-dark.css +179 -12
  81. package/styles/gantt/bootstrap.css +179 -12
  82. package/styles/gantt/bootstrap4.css +179 -11
  83. package/styles/gantt/bootstrap5-dark.css +178 -10
  84. package/styles/gantt/bootstrap5.css +178 -10
  85. package/styles/gantt/fabric-dark.css +179 -12
  86. package/styles/gantt/fabric.css +179 -12
  87. package/styles/gantt/fluent-dark.css +180 -10
  88. package/styles/gantt/fluent.css +180 -10
  89. package/styles/gantt/highcontrast-light.css +178 -10
  90. package/styles/gantt/highcontrast.css +179 -12
  91. package/styles/gantt/icons/_bootstrap-dark.scss +1 -1
  92. package/styles/gantt/icons/_bootstrap.scss +1 -1
  93. package/styles/gantt/icons/_fabric-dark.scss +1 -1
  94. package/styles/gantt/icons/_fabric.scss +1 -1
  95. package/styles/gantt/icons/_highcontrast.scss +1 -1
  96. package/styles/gantt/icons/_material-dark.scss +1 -1
  97. package/styles/gantt/icons/_material.scss +1 -1
  98. package/styles/gantt/material-dark.css +177 -12
  99. package/styles/gantt/material.css +179 -12
  100. package/styles/gantt/tailwind-dark.css +178 -10
  101. package/styles/gantt/tailwind.css +178 -10
  102. package/styles/highcontrast-light.css +178 -10
  103. package/styles/highcontrast.css +179 -12
  104. package/styles/material-dark.css +177 -12
  105. package/styles/material.css +179 -12
  106. package/styles/tailwind-dark.css +178 -10
  107. package/styles/tailwind.css +178 -10
@@ -0,0 +1,34 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ extendStatics(d, b);
10
+ function __() { this.constructor = d; }
11
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12
+ };
13
+ })();
14
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ };
20
+ import { ChildProperty, Property } from "@syncfusion/ej2-base";
21
+ /**
22
+ * Configures the Loading Indicator of the Gantt.
23
+ */
24
+ var LoadingIndicator = /** @class */ (function (_super) {
25
+ __extends(LoadingIndicator, _super);
26
+ function LoadingIndicator() {
27
+ return _super !== null && _super.apply(this, arguments) || this;
28
+ }
29
+ __decorate([
30
+ Property('Spinner')
31
+ ], LoadingIndicator.prototype, "indicatorType", void 0);
32
+ return LoadingIndicator;
33
+ }(ChildProperty));
34
+ export { LoadingIndicator };
@@ -34,3 +34,5 @@ export * from './sort-settings';
34
34
  export * from './sort-settings-model';
35
35
  export * from './resource-fields';
36
36
  export * from './resource-fields-model';
37
+ export * from './loading-indicator';
38
+ export * from './loading-indicator-model';
@@ -18,3 +18,4 @@ export * from './timeline-settings';
18
18
  export * from './tooltip-settings';
19
19
  export * from './sort-settings';
20
20
  export * from './resource-fields';
21
+ export * from './loading-indicator';
@@ -113,7 +113,7 @@ var ChartRows = /** @class */ (function (_super) {
113
113
  ChartRows.prototype.getIndicatorNode = function (indicator) {
114
114
  var templateString = '<label class="' + cls.label + ' ' + cls.taskIndicatorDiv + '"style="line-height:'
115
115
  + (this.parent.rowHeight) + 'px;' +
116
- 'left:' + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
116
+ (this.parent.enableRtl ? 'right:' : 'left:') + this.getIndicatorleft(indicator.date) + 'px;"><i class="' + indicator.iconClass + '"></i> </label>';
117
117
  return this.createDivElement(templateString);
118
118
  };
119
119
  /**
@@ -139,6 +139,13 @@ var ChartRows = /** @class */ (function (_super) {
139
139
  ChartRows.prototype.getChildTaskbarNode = function (i, rootElement) {
140
140
  var childTaskbarNode = null;
141
141
  var data = this.templateData;
142
+ var direction;
143
+ if (this.parent.enableRtl) {
144
+ direction = 'right:';
145
+ }
146
+ else {
147
+ direction = 'left:';
148
+ }
142
149
  if (this.childTaskbarTemplateFunction) {
143
150
  childTaskbarNode = this.childTaskbarTemplateFunction(extend({ index: i }, data), this.parent, 'TaskbarTemplate', this.getTemplateID('TaskbarTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
144
151
  }
@@ -181,14 +188,15 @@ var ChartRows = /** @class */ (function (_super) {
181
188
  }
182
189
  if (isNaN(parseInt(labelString))) {
183
190
  taskLabel = '<span class="' + cls.taskLabel + '" style="line-height:' +
184
- (this.taskBarHeight - 1) + 'px; text-align: left;' +
191
+ (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
185
192
  'display:' + 'inline-block;' +
186
193
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
187
194
  this.taskBarHeight + 'px;">' + labelString + '</span>';
188
195
  }
189
196
  else {
190
197
  taskLabel = '<span class="' + cls.taskLabel + '" style="line-height:' +
191
- (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'text-align: left;' : '') +
198
+ (this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? ('text-align:' +
199
+ (this.parent.enableRtl ? 'right;' : 'left;')) : '') +
192
200
  +(this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
193
201
  +(this.parent.viewType === 'ResourceView' ? (data.ganttProperties.width - 10) : '') + 'px; height:' +
194
202
  this.taskBarHeight + 'px;">' + labelString + '</span>';
@@ -200,17 +208,17 @@ var ChartRows = /** @class */ (function (_super) {
200
208
  (data.ganttProperties.startDate && !data.ganttProperties.endDate && !data.ganttProperties.duration) ? ('<div class="' + cls.childProgressBarInnerDiv + ' ' + cls.traceChildTaskBar + ' ' +
201
209
  cls.unscheduledTaskbarLeft + ' ' + (data.ganttProperties.isAutoSchedule ?
202
210
  '' : cls.manualChildTaskBar) + '"' +
203
- 'style="left:' + data.ganttProperties.left + 'px; height:' + this.taskBarHeight + 'px;"></div>') :
211
+ 'style="' + direction + data.ganttProperties.left + 'px; height:' + this.taskBarHeight + 'px;"></div>') :
204
212
  (data.ganttProperties.endDate && !data.ganttProperties.startDate && !data.ganttProperties.duration) ?
205
213
  ('<div class="' + cls.childProgressBarInnerDiv + ' ' + cls.traceChildTaskBar + ' ' +
206
214
  cls.unscheduledTaskbarRight + ' ' + (data.ganttProperties.isAutoSchedule ?
207
215
  '' : cls.manualChildTaskBar) + '"' +
208
- 'style="left:' + data.ganttProperties.left + 'px; height:' + this.taskBarHeight + 'px;"></div>') :
216
+ 'style="' + direction + data.ganttProperties.left + 'px; height:' + this.taskBarHeight + 'px;"></div>') :
209
217
  (data.ganttProperties.duration && !data.ganttProperties.startDate && !data.ganttProperties.endDate) ?
210
218
  ('<div class="' + cls.childProgressBarInnerDiv + ' ' + cls.traceChildTaskBar + ' ' +
211
219
  cls.unscheduledTaskbar + ' ' + (data.ganttProperties.isAutoSchedule ?
212
220
  '' : cls.manualChildTaskBar) + '"' +
213
- 'style="left:' + data.ganttProperties.left + 'px; width:' + data.ganttProperties.width + 'px;' +
221
+ 'style="' + direction + data.ganttProperties.left + 'px; width:' + data.ganttProperties.width + 'px;' +
214
222
  ' height:' + this.taskBarHeight + 'px;"></div>') : '';
215
223
  if (data.ganttProperties.startDate && data.ganttProperties.endDate && data.ganttProperties.duration &&
216
224
  (isNullOrUndefined(data.ganttProperties.segments) || (!isNullOrUndefined(data.ganttProperties.segments) &&
@@ -238,6 +246,13 @@ var ChartRows = /** @class */ (function (_super) {
238
246
  childTaskbarNode = this.createDivElement(template);
239
247
  }
240
248
  }
249
+ if (this.parent.enableRtl && childTaskbarNode[0] && childTaskbarNode[0].querySelector('.e-task-label')) {
250
+ childTaskbarNode[0].querySelector('.e-task-label').style.marginLeft = '15px';
251
+ childTaskbarNode[0].querySelector('.e-task-label').style.marginRight = '8px';
252
+ if (childTaskbarNode[0].querySelector('.e-gantt-child-progressbar')) {
253
+ childTaskbarNode[0].querySelector('.e-gantt-child-progressbar').style.textAlign = 'left';
254
+ }
255
+ }
241
256
  return childTaskbarNode;
242
257
  };
243
258
  ChartRows.prototype.splitTaskbar = function (data, labelString) {
@@ -257,7 +272,7 @@ var ChartRows = /** @class */ (function (_super) {
257
272
  //split taskbar
258
273
  '<div class="' + cls.childTaskBarInnerDiv + ' ' + segmentPosition + ' ' + cls.traceChildTaskBar + ' ' +
259
274
  ' e-segmented-taskbar' +
260
- '"style="width:' + segment.width + 'px;position: absolute; left:' + segment.left + 'px;height:' +
275
+ '"style="width:' + segment.width + 'px;position: absolute;' + (this.parent.enableRtl ? 'right:' : 'left:') + segment.left + 'px;height:' +
261
276
  (this.taskBarHeight) + 'px; overflow:' + progressBarVisible + ';" data-segment-index = "' + i + '" aria-label = "' +
262
277
  this.generateSpiltTaskAriaLabel(segment, data.ganttProperties) + '"> ' +
263
278
  this.getSplitTaskbarLeftResizerNode() +
@@ -265,7 +280,7 @@ var ChartRows = /** @class */ (function (_super) {
265
280
  '<div class="' + cls.childProgressBarInnerDiv + ' ' + cls.traceChildProgressBar + ' ' +
266
281
  '" style="border-style:' + (segment.progressWidth ? 'solid;' : 'none;') +
267
282
  'display:' + (segment.progressWidth >= 0 ? 'block;' : 'none;') +
268
- 'width:' + segment.progressWidth + 'px;height:100%;' +
283
+ 'width:' + segment.progressWidth + 'px;height:100%;' + 'text-align:' + (this.parent.enableRtl ? 'left;' : 'right;') +
269
284
  'border-top-right-radius:' + this.getSplitTaskBorderRadius(segment) + 'px;' +
270
285
  'border-bottom-right-radius:' + this.getSplitTaskBorderRadius(segment) + 'px;">' +
271
286
  // progress label
@@ -282,19 +297,20 @@ var ChartRows = /** @class */ (function (_super) {
282
297
  ChartRows.prototype.getSplitTaskbarLeftResizerNode = function () {
283
298
  var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
284
299
  var template = '<div class="' + cls.taskBarLeftResizer + ' ' + cls.icon + '"' +
285
- ' style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
300
+ ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
286
301
  return template;
287
302
  };
288
303
  ChartRows.prototype.getSplitTaskbarRightResizerNode = function (segment) {
289
304
  var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
290
305
  var template = '<div class="' + cls.taskBarRightResizer + ' ' + cls.icon + '"' +
291
- ' style="left:' + (segment.width + rResizerLeft) + 'px;' +
306
+ ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (segment.width + rResizerLeft) + 'px;' +
292
307
  'height:' + (this.taskBarHeight) + 'px;"></div>';
293
308
  return template;
294
309
  };
295
310
  ChartRows.prototype.getSplitProgressResizerNode = function (segment) {
311
+ var width = this.parent.enableRtl ? (segment.progressWidth + 8) : (segment.progressWidth - 6);
296
312
  var template = '<div class="' + cls.childProgressResizer + '"' +
297
- ' style="left:' + (segment.progressWidth - 6) + 'px;margin-top:' +
313
+ ' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + width + 'px;margin-top:' +
298
314
  (this.taskBarHeight - 4) + 'px;"><div class="' + cls.progressBarHandler + '"' +
299
315
  '><div class="' + cls.progressHandlerElement + '"></div>' +
300
316
  '<div class="' + cls.progressBarHandlerAfter + '"></div></div>';
@@ -424,6 +440,12 @@ var ChartRows = /** @class */ (function (_super) {
424
440
  }
425
441
  }
426
442
  this.parent.trigger('actionComplete', args);
443
+ if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
444
+ this.parent.hideMaskRow();
445
+ }
446
+ else {
447
+ this.parent.hideSpinner();
448
+ }
427
449
  setValue('isEdit', false, this.parent.contextMenuModule);
428
450
  setValue('isEdit', false, this.parent);
429
451
  };
@@ -628,7 +650,7 @@ var ChartRows = /** @class */ (function (_super) {
628
650
  ChartRows.prototype.getTaskBaselineNode = function () {
629
651
  var data = this.templateData;
630
652
  var template = '<div class="' + cls.baselineBar + ' ' + '" role="term" style="margin-top:' + this.baselineTop +
631
- 'px;left:' + data.ganttProperties.baselineLeft + 'px;' +
653
+ 'px;' + (this.parent.enableRtl ? 'right:' : 'left:') + data.ganttProperties.baselineLeft + 'px;' +
632
654
  'width:' + data.ganttProperties.baselineWidth + 'px;height:' +
633
655
  this.baselineHeight + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + '"></div>';
634
656
  return this.createDivElement(template);
@@ -643,7 +665,7 @@ var ChartRows = /** @class */ (function (_super) {
643
665
  var data = this.templateData;
644
666
  var baselineMilestoneHeight = this.parent.renderBaseline ? 5 : 2;
645
667
  var template = '<div class="' + cls.baselineMilestoneContainer + ' ' + '" style="' +
646
- 'left:' + (data.ganttProperties.baselineLeft - this.milesStoneRadius) + 'px;' +
668
+ (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.baselineLeft - this.milesStoneRadius) + 'px;' +
647
669
  'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) +
648
670
  'px">' + '<div class="' + cls.baselineMilestoneDiv + '">' + '<div class="' + cls.baselineMilestoneDiv +
649
671
  ' ' + cls.baselineMilestoneTop + '" ' +
@@ -693,6 +715,10 @@ var ChartRows = /** @class */ (function (_super) {
693
715
  }
694
716
  leftLabelNode[0].appendChild([].slice.call(leftLabelTemplateNode)[0]);
695
717
  }
718
+ if (this.parent.enableRtl) {
719
+ leftLabelNode[0].style.paddingLeft = '25px';
720
+ leftLabelNode[0].style.paddingRight = '0px';
721
+ }
696
722
  return leftLabelNode;
697
723
  };
698
724
  ChartRows.prototype.getLableText = function (labelString, labelDiv) {
@@ -739,6 +765,10 @@ var ChartRows = /** @class */ (function (_super) {
739
765
  }
740
766
  rightLabelNode[0].appendChild([].slice.call(rightLabelTemplateNode)[0]);
741
767
  }
768
+ if (this.parent.enableRtl) {
769
+ rightLabelNode[0].style.marginLeft = '0px';
770
+ rightLabelNode[0].style.paddingRight = '25px';
771
+ }
742
772
  return rightLabelNode;
743
773
  };
744
774
  ChartRows.prototype.getManualTaskbar = function () {
@@ -758,17 +788,18 @@ var ChartRows = /** @class */ (function (_super) {
758
788
  taskbarHeight * 2 + 'px;border-left-width:' + taskbarHeight / 5 +
759
789
  'px; border-bottom:' + taskbarHeight / 5 + 'px solid transparent;"></div>');
760
790
  var template = '<div class="' + cls.manualParentMainContainer + '"' +
761
- 'style=left:' + (data.ganttProperties.left - data.ganttProperties.autoLeft) + 'px;' +
791
+ 'style=' + (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.left - data.ganttProperties.autoLeft) + 'px;' +
762
792
  'width:' + data.ganttProperties.width + 'px;' +
763
793
  'height:' + taskbarHeight + 'px;>' + innerDiv + ((data.ganttProperties.startDate && data.ganttProperties.endDate &&
764
794
  data.ganttProperties.duration) || data.ganttProperties.duration ? '<div class="e-gantt-manualparenttaskbar-left" style=' +
765
- '"height:' + taskbarHeight + 'px;border-left-width:' + taskbarHeight / 5 +
795
+ (this.parent.enableRtl ? 'margin-right:0px;' : '') + '"height:' + taskbarHeight + 'px;border-left-width:' + taskbarHeight / 5 +
766
796
  'px; border-bottom:' + taskbarHeight / 5 + 'px solid transparent;"></div>' +
767
- '<div class="e-gantt-manualparenttaskbar-right" style=' +
768
- 'left:' + (data.ganttProperties.width - taskbarHeight / 5) + 'px;height:' +
797
+ '<div class="e-gantt-manualparenttaskbar-right" style=' + (this.parent.enableRtl ? 'margin-right:-8px;' : '') +
798
+ (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - taskbarHeight / 5) + 'px;height:' +
769
799
  (taskbarHeight) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
770
800
  taskbarHeight / 5 + 'px solid transparent;>' + '</div></div>' : '');
771
- var milestoneTemplate = '<div class="' + cls.manualParentMilestone + '" style="position:absolute;left:' +
801
+ var milestoneTemplate = '<div class="' + cls.manualParentMilestone + '" style="position:absolute;' +
802
+ (this.parent.enableRtl ? 'right:' : 'left:') +
772
803
  (data.ganttProperties.left - data.ganttProperties.autoLeft - (this.milestoneHeight / 2)) +
773
804
  'px;width:' + (this.milesStoneRadius * 2) +
774
805
  'px;">' + '<div class="' + cls.manualParentMilestoneTop + '" style="border-right-width:' +
@@ -829,7 +860,7 @@ var ChartRows = /** @class */ (function (_super) {
829
860
  }
830
861
  if (isNaN(parseInt(labelString))) {
831
862
  labelDiv = '<span class="' + cls.taskLabel + '" style="line-height:' +
832
- (this.taskBarHeight - 1) + 'px; text-align: left;' +
863
+ (this.taskBarHeight - 1) + 'px; text-align:' + (this.parent.enableRtl ? 'right;' : 'left;') +
833
864
  'display:' + 'inline-block;' +
834
865
  'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
835
866
  this.taskBarHeight + 'px;">' + labelString + '</span>';
@@ -867,6 +898,13 @@ var ChartRows = /** @class */ (function (_super) {
867
898
  parentTaskbarNode = data.ganttProperties.isMilestone ?
868
899
  this.createDivElement(data.ganttProperties.isAutoSchedule ? milestoneTemplate : '') : template;
869
900
  }
901
+ if (this.parent.enableRtl && parentTaskbarNode[0] && parentTaskbarNode[0].querySelector('.e-task-label')) {
902
+ parentTaskbarNode[0].querySelector('.e-task-label').style.marginLeft = '15px';
903
+ parentTaskbarNode[0].querySelector('.e-task-label').style.marginRight = '8px';
904
+ if (parentTaskbarNode[0].querySelector('.e-gantt-parent-progressbar')) {
905
+ parentTaskbarNode[0].querySelector('.e-gantt-parent-progressbar').style.textAlign = 'left';
906
+ }
907
+ }
870
908
  return parentTaskbarNode;
871
909
  };
872
910
  /**
@@ -962,35 +1000,36 @@ var ChartRows = /** @class */ (function (_super) {
962
1000
  ((data.ganttProperties.cssClass) ? data.ganttProperties.cssClass : '') + '" ' +
963
1001
  ' tabindex="-1" role="term" style="' + ((data.ganttProperties.isMilestone && !manualParent) ?
964
1002
  ('width:' + this.milestoneHeight + 'px;height:' +
965
- this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;left:' + (data.ganttProperties.left -
1003
+ this.milestoneHeight + 'px;margin-top:' + this.milestoneMarginTop + 'px;' + (this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.left -
966
1004
  (this.milestoneHeight / 2)) + 'px;') : ('width:' + data.ganttProperties.width +
967
- 'px;margin-top:' + this.taskBarMarginTop + 'px;left:' + (!data.hasChildRecords || data.ganttProperties.isAutoSchedule ?
1005
+ 'px;margin-top:' + this.taskBarMarginTop + 'px;' + (this.parent.enableRtl ? 'right:' : 'left:') + (!data.hasChildRecords || data.ganttProperties.isAutoSchedule ?
968
1006
  data.ganttProperties.left : data.ganttProperties.autoLeft) + 'px;height:' +
969
1007
  this.taskBarHeight + 'px;cursor:' + (data.ganttProperties.isAutoSchedule ? 'move;' : 'auto;'))) + '"></div>';
970
1008
  return this.createDivElement(template);
971
1009
  };
972
1010
  ChartRows.prototype.rightLabelContainer = function () {
973
1011
  var template = '<div class="' + ((this.rightTaskLabelTemplateFunction) ? cls.rightLabelTempContainer :
974
- cls.rightLabelContainer) + '" ' + ' tabindex="-1" role="term" style="left:' + this.getRightLabelLeft(this.templateData) + 'px; height:'
1012
+ cls.rightLabelContainer) + '" ' + ' tabindex="-1" role="term" style="' + (this.parent.enableRtl ? 'right:' : 'left:') + this.getRightLabelLeft(this.templateData) + 'px; height:'
975
1013
  + (this.parent.rowHeight - 2) + 'px;"></div>';
976
1014
  return this.createDivElement(template);
977
1015
  };
978
1016
  ChartRows.prototype.childTaskbarLeftResizer = function () {
979
1017
  var lResizerLeft = -(this.parent.isAdaptive ? 12 : 2);
980
1018
  var template = '<div class="' + cls.taskBarLeftResizer + ' ' + cls.icon + '"' +
981
- 'style="left:' + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
1019
+ 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
982
1020
  return this.createDivElement(template);
983
1021
  };
984
1022
  ChartRows.prototype.childTaskbarRightResizer = function () {
985
1023
  var rResizerLeft = this.parent.isAdaptive ? -2 : -10;
986
1024
  var template = '<div class="' + cls.taskBarRightResizer + ' ' + cls.icon + '"' +
987
- 'style="left:' + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
1025
+ 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
988
1026
  'height:' + (this.taskBarHeight) + 'px;"></div>';
989
1027
  return this.createDivElement(template);
990
1028
  };
991
1029
  ChartRows.prototype.childTaskbarProgressResizer = function () {
1030
+ var width = this.parent.enableRtl ? (this.templateData.ganttProperties.progressWidth + 8) : (this.templateData.ganttProperties.progressWidth - 6);
992
1031
  var template = '<div class="' + cls.childProgressResizer + '"' +
993
- 'style="left:' + (this.templateData.ganttProperties.progressWidth - 6) + 'px;margin-top:' +
1032
+ 'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + width + 'px;margin-top:' +
994
1033
  (this.taskBarHeight - 4) + 'px;"><div class="' + cls.progressBarHandler + '"' +
995
1034
  '><div class="' + cls.progressHandlerElement + '"></div>' +
996
1035
  '<div class="' + cls.progressBarHandlerAfter + '"></div></div>';
@@ -1012,7 +1051,7 @@ var ChartRows = /** @class */ (function (_super) {
1012
1051
  ((data.ganttProperties.isMilestone) ? ('margin-top:' + pointerTop + 'px;left:' + mileStoneLeft +
1013
1052
  'px;') : (marginTop + ';left:' + pointerLeft + 'px;')) + '">' +
1014
1053
  '<div class="' + cls.connectorPointLeft + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
1015
- '" style="width: ' + this.connectorPointWidth + 'px;' +
1054
+ '" style="width: ' + this.connectorPointWidth + 'px;' + (this.parent.enableRtl ? 'margin-right:2px;' : '') +
1016
1055
  'height: ' + this.connectorPointWidth + 'px;">' + this.touchLeftConnectorpoint + '</div></div>';
1017
1056
  return this.createDivElement(template);
1018
1057
  };
@@ -1245,6 +1284,7 @@ var ChartRows = /** @class */ (function (_super) {
1245
1284
  }
1246
1285
  this.parent.ganttChartModule.renderRangeContainer(this.parent.currentViewData);
1247
1286
  }
1287
+ this.parent.ganttChartModule.updateLastRowBottomWidth();
1248
1288
  };
1249
1289
  /**
1250
1290
  * To render taskbars.
@@ -1285,8 +1325,14 @@ var ChartRows = /** @class */ (function (_super) {
1285
1325
  else {
1286
1326
  for (var i = 0; i < this.parent.currentViewData.length; i++) {
1287
1327
  var tempTemplateData = this.parent.currentViewData[i];
1288
- if (this.parent.viewType === 'ResourceView' && !tempTemplateData.expanded && this.parent.enableMultiTaskbar) {
1289
- collapsedResourceRecord.push(tempTemplateData);
1328
+ if (this.parent.viewType === 'ResourceView') {
1329
+ if (this.parent.editModule && this.parent.editModule.isResourceTaskDeleted) {
1330
+ this.parent.initialChartRowElements = this.parent.ganttChartModule.getChartRows();
1331
+ this.parent.editModule.isResourceTaskDeleted = false;
1332
+ }
1333
+ if (!tempTemplateData.expanded && this.parent.enableMultiTaskbar) {
1334
+ collapsedResourceRecord.push(tempTemplateData);
1335
+ }
1290
1336
  }
1291
1337
  var tRow = this.getGanttChartRow(i, tempTemplateData);
1292
1338
  this.ganttChartTableBody.appendChild(tRow);
@@ -1330,7 +1376,7 @@ var ChartRows = /** @class */ (function (_super) {
1330
1376
  taskbarContainerNode[0].setAttribute('aria-label', this.generateAriaLabel(this.templateData));
1331
1377
  taskbarContainerNode[0].setAttribute('rowUniqueId', this.templateData.ganttProperties.rowUniqueID);
1332
1378
  var connectorLineLeftNode = this.getLeftPointNode();
1333
- if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
1379
+ if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
1334
1380
  taskbarContainerNode[0].appendChild([].slice.call(connectorLineLeftNode)[0]);
1335
1381
  }
1336
1382
  if (this.templateData.hasChildRecords) {
@@ -1347,9 +1393,9 @@ var ChartRows = /** @class */ (function (_super) {
1347
1393
  }
1348
1394
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
1349
1395
  this.templateData.ganttProperties.baselineEndDate) {
1350
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1396
+ taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1351
1397
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
1352
- this.templateData.ganttProperties.isMilestone)
1398
+ this.templateData.ganttProperties.isMilestone))
1353
1399
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
1354
1400
  }
1355
1401
  }
@@ -1360,9 +1406,9 @@ var ChartRows = /** @class */ (function (_super) {
1360
1406
  }
1361
1407
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
1362
1408
  this.templateData.ganttProperties.baselineEndDate) {
1363
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1409
+ taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1364
1410
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
1365
- this.templateData.ganttProperties.isMilestone)
1411
+ this.templateData.ganttProperties.isMilestone))
1366
1412
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
1367
1413
  }
1368
1414
  }
@@ -1408,13 +1454,13 @@ var ChartRows = /** @class */ (function (_super) {
1408
1454
  }
1409
1455
  if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
1410
1456
  this.templateData.ganttProperties.baselineEndDate) {
1411
- taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1457
+ taskBaselineTemplateNode = ((this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.baselineEndDate.getTime()) || ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
1412
1458
  && (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
1413
- this.templateData.ganttProperties.isMilestone)
1459
+ this.templateData.ganttProperties.isMilestone))
1414
1460
  ? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
1415
1461
  }
1416
1462
  }
1417
- if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType == 'ProjectView') || !this.templateData.hasChildRecords) {
1463
+ if ((this.templateData.ganttProperties.isAutoSchedule && this.parent.viewType === 'ProjectView') || !this.templateData.hasChildRecords) {
1418
1464
  var connectorLineRightNode = this.getRightPointNode();
1419
1465
  taskbarContainerNode[0].appendChild([].slice.call(connectorLineRightNode)[0]);
1420
1466
  }
@@ -1510,6 +1556,10 @@ var ChartRows = /** @class */ (function (_super) {
1510
1556
  var taskbarElement = !isNullOrUndefined(data.ganttProperties.segments) && data.ganttProperties.segments.length > 0 ? trElement :
1511
1557
  trElement.querySelector('.' + cls.taskBarMainContainer);
1512
1558
  var rowElement;
1559
+ var segmentRowElement;
1560
+ if (data.ganttProperties.segments && data.ganttProperties.segments.length > 0) {
1561
+ segmentRowElement = trElement.parentElement.parentElement.parentElement;
1562
+ }
1513
1563
  var triggerTaskbarElement;
1514
1564
  var args = {
1515
1565
  data: data,
@@ -1522,7 +1572,8 @@ var ChartRows = /** @class */ (function (_super) {
1522
1572
  args.milestoneColor = taskbarElement.querySelector(classCollections[0]) ?
1523
1573
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderBottomColor : null;
1524
1574
  args.baselineColor = trElement.querySelector(classCollections[1]) ?
1525
- getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor : null;
1575
+ getComputedStyle(trElement.querySelector(classCollections[1])).borderBottomColor :
1576
+ (trElement.querySelector('.' + cls.baselineBar) ? getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor : null);
1526
1577
  }
1527
1578
  else {
1528
1579
  var childTask = taskbarElement.querySelector(classCollections[0]);
@@ -1539,17 +1590,33 @@ var ChartRows = /** @class */ (function (_super) {
1539
1590
  getComputedStyle(taskbarElement.querySelector(classCollections[1])).backgroundColor;
1540
1591
  // args.progressBarBorderColor = taskbarElement.querySelector(progressBarClass) ?
1541
1592
  // getComputedStyle(taskbarElement.querySelector(progressBarClass)).borderColor : null;
1542
- args.baselineColor = trElement.querySelector('.' + cls.baselineBar) ?
1543
- getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor : null;
1593
+ if (segmentRowElement) {
1594
+ args.baselineColor = segmentRowElement.querySelector('.' + cls.baselineBar) ?
1595
+ getComputedStyle(segmentRowElement.querySelector('.' + cls.baselineBar)).backgroundColor : null;
1596
+ }
1597
+ else {
1598
+ args.baselineColor = trElement.querySelector('.' + cls.baselineBar) ?
1599
+ getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor : null;
1600
+ }
1544
1601
  args.taskLabelColor = taskbarElement.querySelector('.' + cls.taskLabel) ?
1545
1602
  getComputedStyle(taskbarElement.querySelector('.' + cls.taskLabel)).color : null;
1546
1603
  }
1547
- args.rightLabelColor = trElement.querySelector('.' + cls.rightLabelContainer) &&
1548
- (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) ?
1549
- getComputedStyle((trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color : null;
1550
- args.leftLabelColor = trElement.querySelector('.' + cls.leftLabelContainer) &&
1551
- (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) ?
1552
- getComputedStyle((trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color : null;
1604
+ if (segmentRowElement) {
1605
+ args.rightLabelColor = segmentRowElement.querySelector('.' + cls.rightLabelContainer) &&
1606
+ (segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) ?
1607
+ getComputedStyle((segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color : null;
1608
+ args.leftLabelColor = segmentRowElement.querySelector('.' + cls.leftLabelContainer) &&
1609
+ (segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) ?
1610
+ getComputedStyle((segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color : null;
1611
+ }
1612
+ else {
1613
+ args.rightLabelColor = trElement.querySelector('.' + cls.rightLabelContainer) &&
1614
+ (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) ?
1615
+ getComputedStyle((trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color : null;
1616
+ args.leftLabelColor = trElement.querySelector('.' + cls.leftLabelContainer) &&
1617
+ (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) ?
1618
+ getComputedStyle((trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color : null;
1619
+ }
1553
1620
  this.parent.trigger('queryTaskbarInfo', args, function (taskbarArgs) {
1554
1621
  _this.updateQueryTaskbarInfoArgs(taskbarArgs, rowElement, triggerTaskbarElement);
1555
1622
  });
@@ -1567,6 +1634,10 @@ var ChartRows = /** @class */ (function (_super) {
1567
1634
  var trElement = args.rowElement;
1568
1635
  var taskbarElement = args.taskbarElement;
1569
1636
  var classCollections = this.getClassName(args);
1637
+ var segmentRowElement;
1638
+ if (args.data.ganttProperties.segments && args.data.ganttProperties.segments.length > 0) {
1639
+ segmentRowElement = trElement.parentElement.parentElement.parentElement;
1640
+ }
1570
1641
  if (args.taskbarType === 'Milestone') {
1571
1642
  if (taskbarElement.querySelector(classCollections[0]) &&
1572
1643
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).borderBottomColor !== args.milestoneColor) {
@@ -1578,6 +1649,10 @@ var ChartRows = /** @class */ (function (_super) {
1578
1649
  trElement.querySelector(classCollections[1]).style.borderBottomColor = args.baselineColor;
1579
1650
  trElement.querySelector('.' + cls.baselineMilestoneBottom).style.borderTopColor = args.baselineColor;
1580
1651
  }
1652
+ if (trElement.querySelector('.' + cls.baselineBar) &&
1653
+ getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).borderTopColor !== args.baselineColor) {
1654
+ trElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
1655
+ }
1581
1656
  }
1582
1657
  else {
1583
1658
  if (taskbarElement.querySelector(classCollections[0]) &&
@@ -1612,20 +1687,42 @@ var ChartRows = /** @class */ (function (_super) {
1612
1687
  getComputedStyle(taskbarElement.querySelector('.' + cls.taskLabel)).color !== args.taskLabelColor) {
1613
1688
  taskbarElement.querySelector('.' + cls.taskLabel).style.color = args.taskLabelColor;
1614
1689
  }
1615
- if (trElement.querySelector('.' + cls.baselineBar) &&
1616
- getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor !== args.baselineColor) {
1617
- trElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
1690
+ if (segmentRowElement) {
1691
+ if (segmentRowElement.querySelector('.' + cls.baselineBar) &&
1692
+ getComputedStyle(segmentRowElement.querySelector('.' + cls.baselineBar)).backgroundColor !== args.baselineColor) {
1693
+ segmentRowElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
1694
+ }
1695
+ }
1696
+ else {
1697
+ if (trElement.querySelector('.' + cls.baselineBar) &&
1698
+ getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor !== args.baselineColor) {
1699
+ trElement.querySelector('.' + cls.baselineBar).style.backgroundColor = args.baselineColor;
1700
+ }
1618
1701
  }
1619
1702
  }
1620
- if (trElement.querySelector('.' + cls.leftLabelContainer) &&
1621
- (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) &&
1622
- getComputedStyle((trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color !== args.leftLabelColor) {
1623
- (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label).style.color = args.leftLabelColor;
1703
+ if (segmentRowElement) {
1704
+ if (segmentRowElement.querySelector('.' + cls.leftLabelContainer) &&
1705
+ (segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) &&
1706
+ getComputedStyle((segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color !== args.leftLabelColor) {
1707
+ (segmentRowElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label).style.color = args.leftLabelColor;
1708
+ }
1709
+ if (segmentRowElement.querySelector('.' + cls.rightLabelContainer) &&
1710
+ (segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) &&
1711
+ getComputedStyle((segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color !== args.rightLabelColor) {
1712
+ (segmentRowElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label).style.color = args.rightLabelColor;
1713
+ }
1624
1714
  }
1625
- if (trElement.querySelector('.' + cls.rightLabelContainer) &&
1626
- (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) &&
1627
- getComputedStyle((trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color !== args.rightLabelColor) {
1628
- (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label).style.color = args.rightLabelColor;
1715
+ else {
1716
+ if (trElement.querySelector('.' + cls.leftLabelContainer) &&
1717
+ (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label) &&
1718
+ getComputedStyle((trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label)).color !== args.leftLabelColor) {
1719
+ (trElement.querySelector('.' + cls.leftLabelContainer)).querySelector('.' + cls.label).style.color = args.leftLabelColor;
1720
+ }
1721
+ if (trElement.querySelector('.' + cls.rightLabelContainer) &&
1722
+ (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label) &&
1723
+ getComputedStyle((trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label)).color !== args.rightLabelColor) {
1724
+ (trElement.querySelector('.' + cls.rightLabelContainer)).querySelector('.' + cls.label).style.color = args.rightLabelColor;
1725
+ }
1629
1726
  }
1630
1727
  };
1631
1728
  ChartRows.prototype.getClassName = function (args) {