@syncfusion/ej2-gantt 20.1.48 → 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.
- package/CHANGELOG.md +30 -0
- package/dist/ej2-gantt.umd.min.js +2 -2
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +119 -26
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +119 -26
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +2 -2
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +13 -13
- package/src/gantt/actions/dialog-edit.js +9 -0
- package/src/gantt/base/gantt.d.ts +2 -0
- package/src/gantt/base/gantt.js +4 -0
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/export/export-helper.js +3 -0
- package/src/gantt/export/pdf-taskbar.d.ts +1 -0
- package/src/gantt/export/pdf-taskbar.js +36 -12
- package/src/gantt/renderer/chart-rows.js +50 -10
- package/src/gantt/renderer/nonworking-day.d.ts +1 -0
- package/src/gantt/renderer/nonworking-day.js +9 -0
- package/src/gantt/renderer/timeline.js +7 -3
|
@@ -6158,7 +6158,7 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6158
6158
|
// PDf export collection
|
|
6159
6159
|
var timelineCell = {};
|
|
6160
6160
|
timelineCell.startDate = new Date(startDate.getTime());
|
|
6161
|
-
if (mode === 'Month' && tier === 'bottomTier' && (
|
|
6161
|
+
if (mode === 'Month' && tier === 'bottomTier' && (count != 1) && scheduleDateCollection.length === 0) {
|
|
6162
6162
|
isFirstCell = true;
|
|
6163
6163
|
}
|
|
6164
6164
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell, isFirstCell);
|
|
@@ -6172,6 +6172,10 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6172
6172
|
}
|
|
6173
6173
|
isFirstCell = false;
|
|
6174
6174
|
startDate.setTime(newTime);
|
|
6175
|
+
if (startDate.getHours() === 5 && count === 2 && tier === 'bottomTier' &&
|
|
6176
|
+
this.parent.timelineSettings.bottomTier.unit === 'Hour') {
|
|
6177
|
+
startDate.setTime(startDate.getTime() - (1000 * 60 * 60));
|
|
6178
|
+
}
|
|
6175
6179
|
if (startDate >= endDate) {
|
|
6176
6180
|
/* eslint-disable-next-line */
|
|
6177
6181
|
parentTr = this.getHeaterTemplateString(scheduleDateCollection[scheduleDateCollection.length - 1], mode, tier, true, count, timelineCell);
|
|
@@ -6292,12 +6296,12 @@ var Timeline = /** @__PURE__ @class */ (function () {
|
|
|
6292
6296
|
Timeline.prototype.checkDate = function (firstDay, lastDay, increment, count) {
|
|
6293
6297
|
var date = new Date(firstDay.getTime());
|
|
6294
6298
|
date.setTime(date.getTime() + increment);
|
|
6295
|
-
if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
6299
|
+
if (count !== 1 && ((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
6296
6300
|
var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
|
|
6297
6301
|
if (!this.parent.isInDst(date)) {
|
|
6298
6302
|
increment += (1000 * 60 * 60 * diffCount);
|
|
6299
6303
|
}
|
|
6300
|
-
else if (this.parent.isInDst(date)) {
|
|
6304
|
+
else if (this.parent.isInDst(date) && count !== 2) {
|
|
6301
6305
|
increment -= (1000 * 60 * 60 * diffCount);
|
|
6302
6306
|
}
|
|
6303
6307
|
}
|
|
@@ -7053,7 +7057,7 @@ var GanttTreeGrid = /** @__PURE__ @class */ (function () {
|
|
|
7053
7057
|
return eventArgs;
|
|
7054
7058
|
};
|
|
7055
7059
|
GanttTreeGrid.prototype.treeActionComplete = function (args) {
|
|
7056
|
-
var updatedArgs = extend({}, args
|
|
7060
|
+
var updatedArgs = extend({}, args);
|
|
7057
7061
|
if (getValue('requestType', args) === 'sorting') {
|
|
7058
7062
|
this.parent.notify('updateModel', {});
|
|
7059
7063
|
deleteObject(updatedArgs, 'isFrozen');
|
|
@@ -8427,10 +8431,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8427
8431
|
'border-bottom-right-radius:' + this.getBorderRadius(data.ganttProperties) + 'px;">' +
|
|
8428
8432
|
'</div>');
|
|
8429
8433
|
}
|
|
8434
|
+
var tempDiv = createElement('div');
|
|
8430
8435
|
if (this.taskLabelTemplateFunction && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
8431
8436
|
var taskLabelTemplateNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressDiv[0]);
|
|
8432
8437
|
if (taskLabelTemplateNode && taskLabelTemplateNode.length > 0) {
|
|
8433
|
-
var tempDiv = createElement('div');
|
|
8434
8438
|
tempDiv.appendChild(taskLabelTemplateNode[0]);
|
|
8435
8439
|
labelString = tempDiv.innerHTML;
|
|
8436
8440
|
}
|
|
@@ -8439,7 +8443,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8439
8443
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
8440
8444
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
8441
8445
|
}
|
|
8442
|
-
if (labelString
|
|
8446
|
+
if (labelString.indexOf('null') === -1) {
|
|
8447
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' && !this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
8448
|
+
labelString = '';
|
|
8449
|
+
}
|
|
8443
8450
|
if (isNaN(parseInt(labelString))) {
|
|
8444
8451
|
taskLabel$$1 = '<span class="' + taskLabel + '" style="line-height:' +
|
|
8445
8452
|
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
@@ -8477,7 +8484,18 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
8477
8484
|
(isNullOrUndefined(data.ganttProperties.segments) || (!isNullOrUndefined(data.ganttProperties.segments) &&
|
|
8478
8485
|
data.ganttProperties.segments.length === 0))) {
|
|
8479
8486
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
8480
|
-
|
|
8487
|
+
var templateElement = this.createDivElement(template)[0];
|
|
8488
|
+
var childLabel = this.parent.labelSettings.taskLabel;
|
|
8489
|
+
if (childLabel && childLabel['elementRef'])
|
|
8490
|
+
templateElement.appendChild(tempDiv);
|
|
8491
|
+
progressDiv[0].appendChild(templateElement);
|
|
8492
|
+
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
|
|
8493
|
+
!this.isTemplate(childLabel) &&
|
|
8494
|
+
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
8495
|
+
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
8496
|
+
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
8497
|
+
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML != '')
|
|
8498
|
+
progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
|
|
8481
8499
|
}
|
|
8482
8500
|
if (!isNullOrUndefined(taskbarInnerDiv) && taskbarInnerDiv.length > 0) {
|
|
8483
8501
|
taskbarInnerDiv[0].appendChild([].slice.call(progressDiv)[0]);
|
|
@@ -9051,10 +9069,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9051
9069
|
'width:' + data.ganttProperties.progressWidth + 'px;' +
|
|
9052
9070
|
'border-top-right-radius:' + this.getBorderRadius(data) + 'px;' +
|
|
9053
9071
|
'border-bottom-right-radius:' + this.getBorderRadius(data) + 'px;height:100%;"></div>');
|
|
9072
|
+
var div = createElement('div');
|
|
9054
9073
|
if (this.taskLabelTemplateFunction) {
|
|
9055
9074
|
var parentTaskLabelNode = this.taskLabelTemplateFunction(extend({ index: i }, data), this.parent, 'TaskLabelTemplate', this.getTemplateID('TaskLabelTemplate'), false, undefined, progressBarInnerDiv[0]);
|
|
9056
9075
|
if (parentTaskLabelNode && parentTaskLabelNode.length > 0) {
|
|
9057
|
-
var div = createElement('div');
|
|
9058
9076
|
div.appendChild(parentTaskLabelNode[0]);
|
|
9059
9077
|
labelString = div.innerHTML;
|
|
9060
9078
|
}
|
|
@@ -9063,24 +9081,38 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9063
9081
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
9064
9082
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
9065
9083
|
}
|
|
9066
|
-
if (labelString
|
|
9084
|
+
if (labelString.indexOf('null') === -1) {
|
|
9085
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' && !this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
9086
|
+
labelString = '';
|
|
9087
|
+
}
|
|
9067
9088
|
if (isNaN(parseInt(labelString))) {
|
|
9068
|
-
labelDiv =
|
|
9089
|
+
labelDiv = '<span class="' + taskLabel + '" style="line-height:' +
|
|
9069
9090
|
(this.taskBarHeight - 1) + 'px; text-align: left;' +
|
|
9070
9091
|
'display:' + 'inline-block;' +
|
|
9071
9092
|
'width:' + (data.ganttProperties.width - 10) + 'px; height:' +
|
|
9072
|
-
this.taskBarHeight + 'px;">' + labelString + '</span>'
|
|
9093
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
9073
9094
|
}
|
|
9074
9095
|
else {
|
|
9075
|
-
labelDiv =
|
|
9096
|
+
labelDiv = '<span class="' +
|
|
9076
9097
|
taskLabel + '" style="line-height:' +
|
|
9077
9098
|
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display:inline-flex;' : '') +
|
|
9078
9099
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9079
9100
|
(this.taskBarHeight - 1) + 'px;' + (this.parent.viewType === 'ResourceView' ? 'display: inline-flex;' : '') +
|
|
9080
9101
|
(this.parent.viewType === 'ResourceView' ? 'width:' + (data.ganttProperties.width - 10) : '') + 'px; height:' +
|
|
9081
|
-
this.taskBarHeight + 'px;">' + labelString + '</span>'
|
|
9102
|
+
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
9082
9103
|
}
|
|
9083
|
-
|
|
9104
|
+
var labelElement = this.createDivElement(labelDiv)[0];
|
|
9105
|
+
var parentLabel = this.parent.labelSettings.taskLabel;
|
|
9106
|
+
if (parentLabel && parentLabel['elementRef'])
|
|
9107
|
+
labelElement.appendChild(div);
|
|
9108
|
+
progressBarInnerDiv[0].appendChild(labelElement);
|
|
9109
|
+
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
|
|
9110
|
+
!this.isTemplate(parentLabel) &&
|
|
9111
|
+
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
9112
|
+
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
9113
|
+
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
9114
|
+
parentLabel && !parentLabel['elementRef'] && div.innerHTML != '')
|
|
9115
|
+
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
|
|
9084
9116
|
}
|
|
9085
9117
|
var milestoneTemplate = '<div class="' + parentMilestone + '" style="position:absolute;">' +
|
|
9086
9118
|
'<div class="' + parentMilestoneTop + '" style="border-right-width:' +
|
|
@@ -9908,6 +9940,18 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
9908
9940
|
};
|
|
9909
9941
|
ChartRows.prototype.getResourceParent = function (record) {
|
|
9910
9942
|
var chartRows = this.parent.ganttChartModule.getChartRows();
|
|
9943
|
+
//Below code is for rendering taskbartemplate in resource view with multi taskbar
|
|
9944
|
+
if (this.parent.initialChartRowElements) {
|
|
9945
|
+
for (var j = 0; j <= this.parent.initialChartRowElements.length; j++) {
|
|
9946
|
+
if (!isNullOrUndefined(chartRows[j])) {
|
|
9947
|
+
if (!isNullOrUndefined(chartRows[j].childNodes[0].childNodes[1].childNodes[2]) &&
|
|
9948
|
+
!isNullOrUndefined(this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2])) {
|
|
9949
|
+
// eslint-disable-next-line
|
|
9950
|
+
chartRows[j].childNodes[0].childNodes[1].childNodes[2]['innerHTML'] = this.parent.initialChartRowElements[j].childNodes[0].childNodes[1].childNodes[2]['innerHTML'];
|
|
9951
|
+
}
|
|
9952
|
+
}
|
|
9953
|
+
}
|
|
9954
|
+
}
|
|
9911
9955
|
this.templateData = record;
|
|
9912
9956
|
var parentTrNode = this.getTableTrNode();
|
|
9913
9957
|
var leftLabelNode = this.leftLabelContainer();
|
|
@@ -12940,6 +12984,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
12940
12984
|
}
|
|
12941
12985
|
else {
|
|
12942
12986
|
this.treeGrid.dataSource = this.flatData;
|
|
12987
|
+
if (!isNullOrUndefined(document.getElementsByClassName('e-listview')[0])) {
|
|
12988
|
+
this.treeGrid.dataBind();
|
|
12989
|
+
}
|
|
12943
12990
|
}
|
|
12944
12991
|
}
|
|
12945
12992
|
else {
|
|
@@ -13368,6 +13415,7 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
13368
13415
|
this.getCurrentRecords(args);
|
|
13369
13416
|
}
|
|
13370
13417
|
this.notify('recordsUpdated', {});
|
|
13418
|
+
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
13371
13419
|
this.isLoad = false;
|
|
13372
13420
|
this.trigger('dataBound', args);
|
|
13373
13421
|
};
|
|
@@ -18749,6 +18797,13 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
18749
18797
|
dialogModel.target = document.body;
|
|
18750
18798
|
dialogModel.close = this.dialogClose.bind(this);
|
|
18751
18799
|
dialogModel.closeOnEscape = true;
|
|
18800
|
+
dialogModel.beforeClose = function (args) {
|
|
18801
|
+
if (args.closedBy == "escape") {
|
|
18802
|
+
if (args.event.name == "key-pressed" && args.event.target.nodeName == 'INPUT') {
|
|
18803
|
+
args.cancel = true;
|
|
18804
|
+
}
|
|
18805
|
+
}
|
|
18806
|
+
};
|
|
18752
18807
|
dialogModel.open = function (args) {
|
|
18753
18808
|
var dialogElement = getValue('element', args);
|
|
18754
18809
|
var generalTabElement = dialogElement.querySelector('#' + _this.parent.element.id + 'GeneralTabContainer');
|
|
@@ -19034,6 +19089,8 @@ var DialogEdit = /** @__PURE__ @class */ (function () {
|
|
|
19034
19089
|
}
|
|
19035
19090
|
else if (id === ganttObj.element.id + 'NotesTabContainer') {
|
|
19036
19091
|
document.getElementById(id).ej2_instances[0].refresh();
|
|
19092
|
+
var notesTabElement = document.querySelector('#' + this.parent.element.id + 'NotesTabContainer');
|
|
19093
|
+
notesTabElement.style.overflow = 'scroll';
|
|
19037
19094
|
}
|
|
19038
19095
|
else if (id === ganttObj.element.id + 'SegmentsTabContainer') {
|
|
19039
19096
|
if (isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate)) {
|
|
@@ -26362,6 +26419,7 @@ var Toolbar$3 = /** @__PURE__ @class */ (function () {
|
|
|
26362
26419
|
|
|
26363
26420
|
var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
26364
26421
|
function NonWorkingDay(gantt) {
|
|
26422
|
+
this.weekendWidthUpdated = false;
|
|
26365
26423
|
this.parent = gantt;
|
|
26366
26424
|
this.nonworkingContainer = null;
|
|
26367
26425
|
this.holidayContainer = null;
|
|
@@ -26501,6 +26559,14 @@ var NonWorkingDay = /** @__PURE__ @class */ (function () {
|
|
|
26501
26559
|
width = this.parent.dataOperation.getTaskWidth(start, tempEnd);
|
|
26502
26560
|
isFirstCell = false;
|
|
26503
26561
|
}
|
|
26562
|
+
var sDate = new Date(startDate);
|
|
26563
|
+
sDate.setDate(sDate.getDate() + 1);
|
|
26564
|
+
if (sDate.getTimezoneOffset() != this.parent.timelineModule.timelineStartDate.getTimezoneOffset() && !this.weekendWidthUpdated) {
|
|
26565
|
+
if (this.parent.timelineModule.bottomTier == 'Hour' && this.parent.timelineSettings.bottomTier.count === 1) {
|
|
26566
|
+
width = width - this.parent.timelineSettings.timelineUnitSize;
|
|
26567
|
+
this.weekendWidthUpdated = true;
|
|
26568
|
+
}
|
|
26569
|
+
}
|
|
26504
26570
|
var weekendDiv = createElement('div', {
|
|
26505
26571
|
className: weekend, styles: "left:" + left + "px;width:" + width + "px;height:100%;"
|
|
26506
26572
|
});
|
|
@@ -30892,6 +30958,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
30892
30958
|
if (data[_this.parent.labelSettings.rightLabel]) {
|
|
30893
30959
|
taskbar.rightTaskLabel.value = data[_this.parent.labelSettings.rightLabel].toString();
|
|
30894
30960
|
}
|
|
30961
|
+
if (data[_this.parent.labelSettings.taskLabel]) {
|
|
30962
|
+
taskbar.taskLabel = data[_this.parent.labelSettings.taskLabel].toString();
|
|
30963
|
+
}
|
|
30895
30964
|
var reduceLeft = ganttProp.isMilestone ? Math.floor(_this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
|
|
30896
30965
|
taskbar.rightTaskLabel.left = ganttProp.left + ganttProp.width + reduceLeft; // right label left value
|
|
30897
30966
|
taskbar.fontFamily = _this.ganttStyle.fontFamily;
|
|
@@ -31253,6 +31322,12 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
31253
31322
|
var progressFormat = new PdfStringFormat();
|
|
31254
31323
|
progressFormat.lineAlignment = PdfVerticalAlignment.Middle;
|
|
31255
31324
|
progressFormat.alignment = PdfTextAlignment.Right;
|
|
31325
|
+
var isLabelString = false;
|
|
31326
|
+
var updatedWidth;
|
|
31327
|
+
if (/^[a-zA-Z]/.test(this.taskLabel)) {
|
|
31328
|
+
isLabelString = true;
|
|
31329
|
+
progressFormat.alignment = PdfTextAlignment.Left;
|
|
31330
|
+
}
|
|
31256
31331
|
var pageIndex = -1;
|
|
31257
31332
|
if (!taskbar.isMilestone) {
|
|
31258
31333
|
var taskbarPen = new PdfPen(taskbar.taskBorderColor);
|
|
@@ -31274,10 +31349,14 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
31274
31349
|
}
|
|
31275
31350
|
else {
|
|
31276
31351
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
31277
|
-
if (this.
|
|
31352
|
+
if (this.isScheduledTask) {
|
|
31278
31353
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
31279
|
-
if (!isNullOrUndefined(this.parent.
|
|
31280
|
-
|
|
31354
|
+
if (!isNullOrUndefined(this.parent.labelSettings.taskLabel) && !isNullOrUndefined(this.taskLabel)) {
|
|
31355
|
+
updatedWidth = this.progressWidth;
|
|
31356
|
+
if (isLabelString) {
|
|
31357
|
+
updatedWidth = this.width;
|
|
31358
|
+
}
|
|
31359
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
31281
31360
|
}
|
|
31282
31361
|
}
|
|
31283
31362
|
}
|
|
@@ -31292,14 +31371,16 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
31292
31371
|
this.isStartPoint = true;
|
|
31293
31372
|
}
|
|
31294
31373
|
var renderWidth = 0;
|
|
31295
|
-
|
|
31374
|
+
if (!isLabelString) {
|
|
31375
|
+
this.width = this.width - (detail.totalWidth - (this.left - cumulativeWidth));
|
|
31376
|
+
}
|
|
31296
31377
|
renderWidth = (detail.totalWidth - (this.left - cumulativeWidth));
|
|
31297
31378
|
if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
|
|
31298
31379
|
this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
|
|
31299
31380
|
}
|
|
31300
31381
|
else {
|
|
31301
31382
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
31302
|
-
if (this.
|
|
31383
|
+
if (this.isScheduledTask) {
|
|
31303
31384
|
var progressBoundsWidth = 0;
|
|
31304
31385
|
if (this.progressWidth <= renderWidth) {
|
|
31305
31386
|
progressBoundsWidth = this.progressWidth;
|
|
@@ -31309,8 +31390,12 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
31309
31390
|
}
|
|
31310
31391
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
|
|
31311
31392
|
this.progressWidth -= progressBoundsWidth;
|
|
31312
|
-
if (this.
|
|
31313
|
-
|
|
31393
|
+
if (this.parent.labelSettings.taskLabel && !isNullOrUndefined(this.taskLabel)) {
|
|
31394
|
+
updatedWidth = progressBoundsWidth;
|
|
31395
|
+
if (isLabelString) {
|
|
31396
|
+
updatedWidth = this.width;
|
|
31397
|
+
}
|
|
31398
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
31314
31399
|
}
|
|
31315
31400
|
}
|
|
31316
31401
|
}
|
|
@@ -31327,8 +31412,12 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
31327
31412
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
31328
31413
|
if (this.isScheduledTask) {
|
|
31329
31414
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
31330
|
-
if (this.
|
|
31331
|
-
|
|
31415
|
+
if (!isNullOrUndefined(this.taskLabel)) {
|
|
31416
|
+
updatedWidth = this.progressWidth;
|
|
31417
|
+
if (isLabelString) {
|
|
31418
|
+
updatedWidth = this.width;
|
|
31419
|
+
}
|
|
31420
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
31332
31421
|
}
|
|
31333
31422
|
}
|
|
31334
31423
|
this.isCompleted = true;
|
|
@@ -31342,7 +31431,7 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
31342
31431
|
this.isStartPoint = true;
|
|
31343
31432
|
}
|
|
31344
31433
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
|
|
31345
|
-
if (this.
|
|
31434
|
+
if (this.isScheduledTask) {
|
|
31346
31435
|
var progressBoundsWidth = 0;
|
|
31347
31436
|
if (this.progressWidth <= detail.totalWidth) {
|
|
31348
31437
|
progressBoundsWidth = this.progressWidth;
|
|
@@ -31352,8 +31441,12 @@ var PdfGanttTaskbarCollection = /** @__PURE__ @class */ (function () {
|
|
|
31352
31441
|
}
|
|
31353
31442
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
|
|
31354
31443
|
this.progressWidth -= progressBoundsWidth;
|
|
31355
|
-
if (this.
|
|
31356
|
-
|
|
31444
|
+
if (!isNullOrUndefined(this.taskLabel)) {
|
|
31445
|
+
updatedWidth = progressBoundsWidth;
|
|
31446
|
+
if (isLabelString) {
|
|
31447
|
+
updatedWidth = this.width;
|
|
31448
|
+
}
|
|
31449
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
31357
31450
|
}
|
|
31358
31451
|
}
|
|
31359
31452
|
this.isCompleted = false;
|