@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.
- package/CHANGELOG.md +195 -163
- package/dist/ej2-gantt.min.js +2 -2
- 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 +1003 -292
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1040 -313
- 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 +21 -21
- package/src/gantt/actions/cell-edit.js +4 -1
- package/src/gantt/actions/context-menu.js +4 -1
- package/src/gantt/actions/critical-path.d.ts +2 -0
- package/src/gantt/actions/critical-path.js +81 -59
- package/src/gantt/actions/dependency.d.ts +1 -0
- package/src/gantt/actions/dependency.js +43 -25
- package/src/gantt/actions/dialog-edit.js +27 -7
- package/src/gantt/actions/edit.d.ts +12 -1
- package/src/gantt/actions/edit.js +91 -10
- package/src/gantt/actions/filter.js +3 -0
- package/src/gantt/actions/pdf-export.d.ts +4 -1
- package/src/gantt/actions/pdf-export.js +36 -3
- package/src/gantt/actions/rowdragdrop.js +10 -2
- package/src/gantt/actions/selection.js +22 -5
- package/src/gantt/actions/taskbar-edit.js +51 -36
- package/src/gantt/actions/toolbar.js +8 -0
- package/src/gantt/base/date-processor.js +3 -3
- package/src/gantt/base/gantt-chart.d.ts +1 -0
- package/src/gantt/base/gantt-chart.js +79 -6
- package/src/gantt/base/gantt-model.d.ts +7 -0
- package/src/gantt/base/gantt.d.ts +6 -0
- package/src/gantt/base/gantt.js +83 -13
- package/src/gantt/base/interface.d.ts +14 -0
- package/src/gantt/base/task-processor.d.ts +4 -4
- package/src/gantt/base/task-processor.js +86 -36
- package/src/gantt/base/tree-grid.js +19 -10
- package/src/gantt/export/export-helper.d.ts +5 -1
- package/src/gantt/export/export-helper.js +152 -4
- package/src/gantt/export/pdf-base/pdf-grid-table.js +2 -2
- package/src/gantt/export/pdf-base/pdf-style/gantt-theme.js +8 -0
- package/src/gantt/export/pdf-base/treegrid-layouter.js +6 -1
- package/src/gantt/export/pdf-connector-line.js +3 -1
- package/src/gantt/export/pdf-gantt.js +6 -0
- package/src/gantt/export/pdf-taskbar.d.ts +13 -0
- package/src/gantt/export/pdf-taskbar.js +39 -5
- package/src/gantt/export/pdf-timeline.js +17 -8
- package/src/gantt/export/pdf-treegrid.js +3 -0
- package/src/gantt/models/task-fields-model.d.ts +7 -0
- package/src/gantt/models/task-fields.d.ts +6 -0
- package/src/gantt/models/task-fields.js +3 -0
- package/src/gantt/renderer/chart-rows.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.js +39 -20
- package/src/gantt/renderer/connector-line.js +49 -9
- package/src/gantt/renderer/edit-tooltip.js +11 -7
- package/src/gantt/renderer/timeline.js +19 -9
- package/src/gantt/renderer/tooltip.js +37 -33
- package/styles/bootstrap-dark.css +44 -100
- package/styles/bootstrap.css +44 -100
- package/styles/bootstrap4.css +44 -100
- package/styles/bootstrap5-dark.css +44 -100
- package/styles/bootstrap5.css +44 -100
- package/styles/fabric-dark.css +44 -100
- package/styles/fabric.css +44 -100
- package/styles/fluent-dark.css +44 -100
- package/styles/fluent.css +44 -100
- package/styles/gantt/_layout.scss +44 -31
- package/styles/gantt/_theme.scss +104 -98
- package/styles/gantt/bootstrap-dark.css +44 -100
- package/styles/gantt/bootstrap-dark.scss +1 -1
- package/styles/gantt/bootstrap.css +44 -100
- package/styles/gantt/bootstrap.scss +1 -1
- package/styles/gantt/bootstrap4.css +44 -100
- package/styles/gantt/bootstrap4.scss +1 -1
- package/styles/gantt/bootstrap5-dark.css +44 -100
- package/styles/gantt/bootstrap5-dark.scss +1 -1
- package/styles/gantt/bootstrap5.css +44 -100
- package/styles/gantt/bootstrap5.scss +1 -1
- package/styles/gantt/fabric-dark.css +44 -100
- package/styles/gantt/fabric-dark.scss +1 -1
- package/styles/gantt/fabric.css +44 -100
- package/styles/gantt/fabric.scss +1 -1
- package/styles/gantt/fluent-dark.css +44 -100
- package/styles/gantt/fluent-dark.scss +1 -1
- package/styles/gantt/fluent.css +44 -100
- package/styles/gantt/fluent.scss +1 -1
- package/styles/gantt/highcontrast-light.css +40 -100
- package/styles/gantt/highcontrast-light.scss +1 -1
- package/styles/gantt/highcontrast.css +44 -100
- package/styles/gantt/highcontrast.scss +1 -1
- package/styles/gantt/icons/_bootstrap-dark.scss +4 -0
- package/styles/gantt/icons/_bootstrap.scss +4 -0
- package/styles/gantt/icons/_bootstrap4.scss +4 -0
- package/styles/gantt/icons/_bootstrap5.scss +4 -0
- package/styles/gantt/icons/_fabric-dark.scss +4 -0
- package/styles/gantt/icons/_fabric.scss +4 -0
- package/styles/gantt/icons/_fluent.scss +4 -0
- package/styles/gantt/icons/_fusionnew.scss +4 -0
- package/styles/gantt/icons/_highcontrast.scss +4 -0
- package/styles/gantt/icons/_material-dark.scss +4 -0
- package/styles/gantt/icons/_material.scss +4 -0
- package/styles/gantt/icons/_material3.scss +4 -0
- package/styles/gantt/icons/_tailwind-dark.scss +4 -0
- package/styles/gantt/icons/_tailwind.scss +4 -0
- package/styles/gantt/material-dark.css +44 -101
- package/styles/gantt/material-dark.scss +1 -1
- package/styles/gantt/material.css +44 -101
- package/styles/gantt/material.scss +1 -1
- package/styles/gantt/material3-dark.css +45 -102
- package/styles/gantt/material3-dark.scss +1 -1
- package/styles/gantt/material3.css +45 -102
- package/styles/gantt/material3.scss +1 -1
- package/styles/gantt/tailwind-dark.css +44 -101
- package/styles/gantt/tailwind-dark.scss +1 -1
- package/styles/gantt/tailwind.css +44 -101
- package/styles/gantt/tailwind.scss +1 -1
- package/styles/highcontrast-light.css +40 -100
- package/styles/highcontrast.css +44 -100
- package/styles/material-dark.css +44 -101
- package/styles/material.css +44 -101
- package/styles/material3-dark.css +45 -102
- package/styles/material3-dark.scss +1 -1
- package/styles/material3.css +45 -102
- package/styles/material3.scss +1 -1
- package/styles/tailwind-dark.css +44 -101
- package/styles/tailwind.css +44 -101
|
@@ -510,7 +510,7 @@ class DateProcessor {
|
|
|
510
510
|
}
|
|
511
511
|
else {
|
|
512
512
|
if ((!isNullOrUndefined(this.parent.taskFields.milestone)) && (!isNullOrUndefined(ganttProperties.startDate)) && !isNullOrUndefined(ganttProperties.endDate) &&
|
|
513
|
-
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() &&
|
|
513
|
+
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && (ganttData.taskData[this.parent.taskFields.milestone] === false)) {
|
|
514
514
|
tDuration = 1;
|
|
515
515
|
}
|
|
516
516
|
else {
|
|
@@ -1529,8 +1529,8 @@ class DateProcessor {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
if (!editArgs) {
|
|
1531
1531
|
this.prevProjectStartDate = this.parent.cloneProjectStartDate;
|
|
1532
|
-
this.parent.cloneProjectStartDate = minStartDate ? minStartDate : new Date(projectStartDate.getTime());
|
|
1533
|
-
this.parent.cloneProjectEndDate = maxEndDate ? maxEndDate : new Date(projectEndDate.getTime());
|
|
1532
|
+
this.parent.cloneProjectStartDate = minStartDate ? (!this.parent.timelineModule.isZoomToFit) ? (!isNullOrUndefined(projectStartDate)) ? new Date(projectStartDate.getTime()) : minStartDate : minStartDate : new Date(projectStartDate.getTime());
|
|
1533
|
+
this.parent.cloneProjectEndDate = maxEndDate ? (!this.parent.timelineModule.isZoomToFit) ? (!isNullOrUndefined(projectEndDate)) ? new Date(projectEndDate.getTime()) : maxEndDate : maxEndDate : new Date(projectEndDate.getTime());
|
|
1534
1534
|
}
|
|
1535
1535
|
else {
|
|
1536
1536
|
setValue('minStartDate', minStartDate, editArgs);
|
|
@@ -1632,7 +1632,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1632
1632
|
dataManager.executeQuery(queryManager).then((e) => {
|
|
1633
1633
|
this.dataArray = e.result;
|
|
1634
1634
|
this.processTimeline();
|
|
1635
|
-
this.
|
|
1635
|
+
if (this.parent.loadChildOnDemand || (!this.parent.loadChildOnDemand && !(this.parent.taskFields.hasChildMapping))) {
|
|
1636
|
+
this.cloneDataSource();
|
|
1637
|
+
}
|
|
1636
1638
|
this.parent.renderGantt(isChange);
|
|
1637
1639
|
}).catch((e) => {
|
|
1638
1640
|
// Trigger action failure event
|
|
@@ -1671,6 +1673,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1671
1673
|
const data = [];
|
|
1672
1674
|
for (let i = 0; i < this.dataArray.length; i++) {
|
|
1673
1675
|
const tempData = this.dataArray[i];
|
|
1676
|
+
if (tempData['parentItem']) {
|
|
1677
|
+
delete tempData['parentItem'];
|
|
1678
|
+
}
|
|
1674
1679
|
data.push(extend({}, {}, tempData, true));
|
|
1675
1680
|
if (!isNullOrUndefined(tempData[taskIdMapping])) {
|
|
1676
1681
|
this.taskIds.push(tempData[taskIdMapping].toString());
|
|
@@ -1680,7 +1685,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
1680
1685
|
this.parent.setProperties({ taskFields: { child: 'Children' } }, true);
|
|
1681
1686
|
}
|
|
1682
1687
|
this.constructDataSource(data);
|
|
1683
|
-
|
|
1688
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping && this.hierarchyData.length === 0) {
|
|
1689
|
+
hierarchicalData = this.dataArray;
|
|
1690
|
+
}
|
|
1691
|
+
else {
|
|
1692
|
+
hierarchicalData = this.hierarchyData;
|
|
1693
|
+
}
|
|
1684
1694
|
}
|
|
1685
1695
|
else {
|
|
1686
1696
|
hierarchicalData = this.dataArray;
|
|
@@ -1889,7 +1899,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
1889
1899
|
if (!isNullOrUndefined(data[taskSettings.id])) {
|
|
1890
1900
|
id = data[taskSettings.id];
|
|
1891
1901
|
name = data[taskSettings.name];
|
|
1892
|
-
this.
|
|
1902
|
+
if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && data['taskData']) {
|
|
1903
|
+
ganttData['taskData'] = data['taskData'];
|
|
1904
|
+
}
|
|
1905
|
+
else {
|
|
1906
|
+
this.addTaskData(ganttData, data, isLoad);
|
|
1907
|
+
}
|
|
1893
1908
|
}
|
|
1894
1909
|
else if (!isNullOrUndefined(data[resourceFields.id])) {
|
|
1895
1910
|
id = data[resourceFields.id];
|
|
@@ -1927,6 +1942,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1927
1942
|
this.parent.setRecordValue('notes', notes, ganttProperties, true);
|
|
1928
1943
|
this.parent.setRecordValue('cssClass', data[taskSettings.cssClass], ganttProperties, true);
|
|
1929
1944
|
this.parent.setRecordValue('parentItem', this.getCloneParent(parentItem), ganttData);
|
|
1945
|
+
if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && this.parent.currentViewData.length > 0) {
|
|
1946
|
+
this.parent.setRecordValue('parentItem', ganttData.parentItem, this.parent.currentViewData[this.taskIds.indexOf(data[taskSettings.id].toString())]);
|
|
1947
|
+
}
|
|
1930
1948
|
const parentUniqId = ganttData.parentItem ? ganttData.parentItem.uniqueID : null;
|
|
1931
1949
|
this.parent.setRecordValue('parentUniqueID', parentUniqId, ganttData);
|
|
1932
1950
|
if (this.parent.viewType === 'ResourceView' && !isNullOrUndefined(taskSettings.parentID)
|
|
@@ -1934,7 +1952,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
1934
1952
|
this.parent.setRecordValue('parentId', ganttData.parentItem.taskId, ganttProperties, true);
|
|
1935
1953
|
}
|
|
1936
1954
|
this.parent.setRecordValue('level', level, ganttData);
|
|
1937
|
-
|
|
1955
|
+
if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && data['uniqueID']) {
|
|
1956
|
+
this.parent.setRecordValue('uniqueID', data['uniqueID'], ganttData);
|
|
1957
|
+
}
|
|
1958
|
+
else {
|
|
1959
|
+
this.parent.setRecordValue('uniqueID', getUid(this.parent.element.id + '_data_'), ganttData);
|
|
1960
|
+
}
|
|
1938
1961
|
this.parent.setRecordValue('uniqueID', ganttData.uniqueID, ganttProperties, true);
|
|
1939
1962
|
this.parent.setRecordValue('childRecords', [], ganttData);
|
|
1940
1963
|
if (this.parent.dataSource instanceof Object && isCountRequired(this.parent) &&
|
|
@@ -1949,7 +1972,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
1949
1972
|
}
|
|
1950
1973
|
}
|
|
1951
1974
|
else {
|
|
1952
|
-
this.parent.
|
|
1975
|
+
if (!this.parent.loadChildOnDemand && taskSettings.hasChildMapping && ganttData.taskData[taskSettings.hasChildMapping]) {
|
|
1976
|
+
this.parent.setRecordValue('hasChildRecords', true, ganttData);
|
|
1977
|
+
}
|
|
1978
|
+
else {
|
|
1979
|
+
this.parent.setRecordValue('hasChildRecords', false, ganttData);
|
|
1980
|
+
}
|
|
1953
1981
|
}
|
|
1954
1982
|
if (ganttData.hasChildRecords) {
|
|
1955
1983
|
this.parent.setRecordValue('autoStartDate', ganttData.ganttProperties.startDate, ganttProperties);
|
|
@@ -2560,7 +2588,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
2560
2588
|
}
|
|
2561
2589
|
else {
|
|
2562
2590
|
this.updateDurationValue(duration, ganttProperties);
|
|
2563
|
-
this.
|
|
2591
|
+
if (this.parent.autoCalculateDateScheduling) {
|
|
2592
|
+
this.calculateEndDate(ganttData);
|
|
2593
|
+
}
|
|
2594
|
+
else {
|
|
2595
|
+
this.parent.setRecordValue('endDate', endDate, ganttProperties, true);
|
|
2596
|
+
}
|
|
2564
2597
|
}
|
|
2565
2598
|
}
|
|
2566
2599
|
/**
|
|
@@ -3054,17 +3087,15 @@ class TaskProcessor extends DateProcessor {
|
|
|
3054
3087
|
else {
|
|
3055
3088
|
hierarchicalData = this.parent.dataSource;
|
|
3056
3089
|
}
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
if (
|
|
3060
|
-
|
|
3061
|
-
task[this.parent.taskFields.endDate] = record[this.parent.taskFields.endDate];
|
|
3062
|
-
}
|
|
3063
|
-
if (!isNullOrUndefined(this.parent.taskFields.endDate)) {
|
|
3064
|
-
task[this.parent.taskFields.endDate] = record[this.parent.taskFields.endDate];
|
|
3065
|
-
}
|
|
3090
|
+
hierarchicalData.map((record) => {
|
|
3091
|
+
if (task.ganttProperties.taskId === record[this.parent.taskFields.id]) {
|
|
3092
|
+
if (!isNullOrUndefined(this.parent.taskFields.startDate)) {
|
|
3093
|
+
task[this.parent.taskFields.startDate] = record[this.parent.taskFields.startDate];
|
|
3066
3094
|
}
|
|
3067
|
-
|
|
3095
|
+
if (!isNullOrUndefined(this.parent.taskFields.endDate)) {
|
|
3096
|
+
task[this.parent.taskFields.endDate] = record[this.parent.taskFields.endDate];
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3068
3099
|
});
|
|
3069
3100
|
}
|
|
3070
3101
|
getWorkInHour(work, workUnit) {
|
|
@@ -3106,7 +3137,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
3106
3137
|
this.setRecordDate(ganttData, ganttProperties.endDate, dataMapping.endDate);
|
|
3107
3138
|
}
|
|
3108
3139
|
if (dataMapping.duration) {
|
|
3109
|
-
|
|
3140
|
+
if (!isNullOrUndefined(dataMapping.milestone) && !ganttData.taskData[dataMapping.milestone]) {
|
|
3141
|
+
this.setRecordDuration(ganttData, dataMapping.duration);
|
|
3142
|
+
}
|
|
3110
3143
|
}
|
|
3111
3144
|
if (dataMapping.durationUnit) {
|
|
3112
3145
|
data[dataMapping.durationUnit] = ganttProperties.durationUnit;
|
|
@@ -3338,7 +3371,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
3338
3371
|
*/
|
|
3339
3372
|
updateDurationValue(duration, ganttProperties) {
|
|
3340
3373
|
const tempDuration = this.getDurationValue(duration);
|
|
3341
|
-
if (!isNaN(getValue('duration', tempDuration))) {
|
|
3374
|
+
if (!isNaN(getValue('duration', tempDuration)) && !(this.parent.viewType === "ResourceView" && tempDuration["duration"] === 0)) {
|
|
3342
3375
|
this.parent.setRecordValue('duration', getValue('duration', tempDuration), ganttProperties, true);
|
|
3343
3376
|
}
|
|
3344
3377
|
if (!isNullOrUndefined(getValue('durationUnit', tempDuration))) {
|
|
@@ -3722,7 +3755,14 @@ class TaskProcessor extends DateProcessor {
|
|
|
3722
3755
|
* @private
|
|
3723
3756
|
*/
|
|
3724
3757
|
reUpdateGanttDataPosition() {
|
|
3725
|
-
|
|
3758
|
+
let flatData;
|
|
3759
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
3760
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
3761
|
+
flatData = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'];
|
|
3762
|
+
}
|
|
3763
|
+
else {
|
|
3764
|
+
flatData = this.parent.flatData;
|
|
3765
|
+
}
|
|
3726
3766
|
const length = flatData.length;
|
|
3727
3767
|
for (let i = 0; i < length; i++) {
|
|
3728
3768
|
const data = flatData[i];
|
|
@@ -3868,7 +3908,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
3868
3908
|
let childCompletedWorks = 0;
|
|
3869
3909
|
let childData;
|
|
3870
3910
|
for (let count = 0; count < childLength; count++) {
|
|
3871
|
-
|
|
3911
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
3912
|
+
childData = this.parent.currentViewData.filter(item => item.ganttProperties.taskId === childRecords[count][this.parent.taskFields.id])[0];
|
|
3913
|
+
}
|
|
3914
|
+
else {
|
|
3915
|
+
childData = childRecords[count];
|
|
3916
|
+
}
|
|
3872
3917
|
if (this.parent.isOnDelete && childData.isDelete) {
|
|
3873
3918
|
if (childLength === 1 && this.parent.viewType === 'ProjectView') {
|
|
3874
3919
|
deleteUpdate = true;
|
|
@@ -4399,6 +4444,7 @@ class GanttChart {
|
|
|
4399
4444
|
constructor(parent) {
|
|
4400
4445
|
this.isExpandCollapseFromChart = false;
|
|
4401
4446
|
this.isExpandAll = false;
|
|
4447
|
+
this.isCollapseAll = false;
|
|
4402
4448
|
this.isGanttElement = false;
|
|
4403
4449
|
this.parent = parent;
|
|
4404
4450
|
this.chartTimelineContainer = null;
|
|
@@ -4748,6 +4794,42 @@ class GanttChart {
|
|
|
4748
4794
|
if (this.parent.editSettings.allowTaskbarEditing) {
|
|
4749
4795
|
this.parent.notify('chartMouseUp', e);
|
|
4750
4796
|
}
|
|
4797
|
+
if (!this.parent.editSettings.allowEditing) {
|
|
4798
|
+
let isTaskbarEdited = false;
|
|
4799
|
+
if (this.parent.editSettings.allowTaskbarEditing &&
|
|
4800
|
+
getValue('editModule.taskbarEditModule.isMouseDragged', this.parent) &&
|
|
4801
|
+
getValue('editModule.taskbarEditModule.taskBarEditAction', this.parent)) {
|
|
4802
|
+
isTaskbarEdited = true;
|
|
4803
|
+
}
|
|
4804
|
+
if (!isTaskbarEdited) {
|
|
4805
|
+
/** Expand/collapse action */
|
|
4806
|
+
const target = e.target;
|
|
4807
|
+
const isOnTaskbarElement = e.target.classList.contains(taskBarMainContainer)
|
|
4808
|
+
|| closest(e.target, '.' + taskBarMainContainer);
|
|
4809
|
+
if (closest(target, '.e-gantt-parent-taskbar') && !this.parent.editSettings.allowEditing) {
|
|
4810
|
+
this.chartExpandCollapseRequest(e);
|
|
4811
|
+
}
|
|
4812
|
+
else if (!isOnTaskbarElement && this.parent.autoFocusTasks) {
|
|
4813
|
+
this.scrollToTarget(e); /** Scroll to task */
|
|
4814
|
+
}
|
|
4815
|
+
}
|
|
4816
|
+
}
|
|
4817
|
+
if (e.type === "touchend") {
|
|
4818
|
+
var resizeCheck = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-taskbar-resize-div');
|
|
4819
|
+
if (!isNullOrUndefined(resizeCheck)) {
|
|
4820
|
+
resizeCheck.remove();
|
|
4821
|
+
}
|
|
4822
|
+
var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar');
|
|
4823
|
+
if (!isNullOrUndefined(Check)) {
|
|
4824
|
+
var clonetbody = Check.parentElement;
|
|
4825
|
+
var cloneTable = clonetbody.parentElement;
|
|
4826
|
+
cloneTable.remove();
|
|
4827
|
+
}
|
|
4828
|
+
var falseline = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-gantt-false-line');
|
|
4829
|
+
if (!isNullOrUndefined(falseline)) {
|
|
4830
|
+
this.parent.editModule.taskbarEditModule.removeFalseLine(true);
|
|
4831
|
+
}
|
|
4832
|
+
}
|
|
4751
4833
|
}
|
|
4752
4834
|
/**
|
|
4753
4835
|
*
|
|
@@ -5141,10 +5223,23 @@ class GanttChart {
|
|
|
5141
5223
|
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
5142
5224
|
return;
|
|
5143
5225
|
}
|
|
5144
|
-
|
|
5226
|
+
let record;
|
|
5227
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
5228
|
+
record = this.parent.currentViewData.filter(item => item.ganttProperties[this.parent.taskFields.id] === args['data'][this.parent.taskFields.id])[0];
|
|
5229
|
+
}
|
|
5230
|
+
else {
|
|
5231
|
+
record = getValue('data', args);
|
|
5232
|
+
}
|
|
5145
5233
|
if (this.isExpandCollapseFromChart) {
|
|
5146
5234
|
this.expandCollapseChartRows('collapse', getValue('chartRow', args), record, null);
|
|
5147
|
-
this.parent.
|
|
5235
|
+
const idField = this.parent.taskFields.id;
|
|
5236
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
5237
|
+
const gridRec = this.parent.treeGrid.getCurrentViewRecords().filter(function (item) { return item[idField] == args['data'][idField]; })[0];
|
|
5238
|
+
this.parent.treeGrid.collapseRow(getValue('gridRow', args), gridRec);
|
|
5239
|
+
}
|
|
5240
|
+
else {
|
|
5241
|
+
this.parent.treeGrid.collapseRow(getValue('gridRow', args), record);
|
|
5242
|
+
}
|
|
5148
5243
|
this.isExpandCollapseFromChart = false;
|
|
5149
5244
|
}
|
|
5150
5245
|
else {
|
|
@@ -5191,10 +5286,23 @@ class GanttChart {
|
|
|
5191
5286
|
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
5192
5287
|
return;
|
|
5193
5288
|
}
|
|
5194
|
-
|
|
5289
|
+
let record;
|
|
5290
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
5291
|
+
record = this.parent.currentViewData.filter(item => item.ganttProperties.taskId == args['data'][this.parent.taskFields.id])[0];
|
|
5292
|
+
}
|
|
5293
|
+
else {
|
|
5294
|
+
record = getValue('data', args);
|
|
5295
|
+
}
|
|
5195
5296
|
if (this.isExpandCollapseFromChart) {
|
|
5196
5297
|
this.expandCollapseChartRows('expand', getValue('chartRow', args), record, null);
|
|
5197
|
-
this.parent.
|
|
5298
|
+
const idField = this.parent.taskFields.id;
|
|
5299
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
5300
|
+
const gridRec = this.parent.treeGrid.getCurrentViewRecords().filter(function (item) { return item[idField] == args['data'][idField]; })[0];
|
|
5301
|
+
this.parent.treeGrid.expandRow(getValue('gridRow', args), gridRec);
|
|
5302
|
+
}
|
|
5303
|
+
else {
|
|
5304
|
+
this.parent.treeGrid.expandRow(getValue('gridRow', args), record);
|
|
5305
|
+
}
|
|
5198
5306
|
this.isExpandCollapseFromChart = false;
|
|
5199
5307
|
}
|
|
5200
5308
|
else {
|
|
@@ -5293,9 +5401,11 @@ class GanttChart {
|
|
|
5293
5401
|
this.parent.treeGrid.expandAll();
|
|
5294
5402
|
}
|
|
5295
5403
|
else {
|
|
5404
|
+
this.isCollapseAll = true;
|
|
5296
5405
|
this.parent.treeGrid.collapseAll();
|
|
5297
5406
|
}
|
|
5298
5407
|
this.isExpandAll = false;
|
|
5408
|
+
this.isCollapseAll = false;
|
|
5299
5409
|
}
|
|
5300
5410
|
/**
|
|
5301
5411
|
* Public method to expand particular level of rows.
|
|
@@ -5778,7 +5888,7 @@ class GanttChart {
|
|
|
5778
5888
|
childElement = element;
|
|
5779
5889
|
}
|
|
5780
5890
|
}
|
|
5781
|
-
if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span')) {
|
|
5891
|
+
if (element.classList.contains('e-right-label-temp-container') || element.classList.contains('e-left-label-temp-container') || element.classList.contains('e-indicator-span') || element.classList.contains("e-timeline-header-container")) {
|
|
5782
5892
|
if (focus === 'add') {
|
|
5783
5893
|
element.setAttribute('tabIndex', '0');
|
|
5784
5894
|
addClass([element], 'e-active-container');
|
|
@@ -5842,7 +5952,13 @@ class GanttChart {
|
|
|
5842
5952
|
recordIndex = this.parent.flatData.indexOf(record);
|
|
5843
5953
|
}
|
|
5844
5954
|
else {
|
|
5845
|
-
|
|
5955
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
5956
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
5957
|
+
recordIndex = this.parent.ids.indexOf(record.ganttProperties.taskId.toString());
|
|
5958
|
+
}
|
|
5959
|
+
else {
|
|
5960
|
+
recordIndex = this.parent.currentViewData.indexOf(record);
|
|
5961
|
+
}
|
|
5846
5962
|
}
|
|
5847
5963
|
}
|
|
5848
5964
|
return recordIndex;
|
|
@@ -5917,7 +6033,9 @@ class Timeline {
|
|
|
5917
6033
|
*/
|
|
5918
6034
|
refreshTimelineByTimeSpan() {
|
|
5919
6035
|
this.validateTimelineProp();
|
|
5920
|
-
this.parent.
|
|
6036
|
+
if (!this.parent.pdfExportModule || (this.parent.pdfExportModule && !this.parent.pdfExportModule.isPdfExport) || (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && !this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
6037
|
+
this.parent.ganttChartModule.chartTimelineContainer.innerHTML = '';
|
|
6038
|
+
}
|
|
5921
6039
|
this.createTimelineSeries();
|
|
5922
6040
|
}
|
|
5923
6041
|
/**
|
|
@@ -6231,7 +6349,10 @@ class Timeline {
|
|
|
6231
6349
|
this.customTimelineSettings.topTier.format = this.validateFormat(this.topTier, this.customTimelineSettings.topTier.format);
|
|
6232
6350
|
this.customTimelineSettings.weekStartDay = this.customTimelineSettings.weekStartDay >= 0 &&
|
|
6233
6351
|
this.customTimelineSettings.weekStartDay <= 6 ? this.customTimelineSettings.weekStartDay : 0;
|
|
6234
|
-
this.
|
|
6352
|
+
if (!(this.parent.pdfExportModule && this.parent.pdfExportModule.helper.exportProps &&
|
|
6353
|
+
this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
6354
|
+
this.checkCurrentZoomingLevel();
|
|
6355
|
+
}
|
|
6235
6356
|
}
|
|
6236
6357
|
/**
|
|
6237
6358
|
* To find the current zooming level of the Gantt control.
|
|
@@ -6476,13 +6597,15 @@ class Timeline {
|
|
|
6476
6597
|
table = createElement('table', { className: timelineHeaderTableContainer, styles: 'display: block;' });
|
|
6477
6598
|
thead = createElement('thead', { className: timelineHeaderTableBody, styles: 'display:block; border-collapse:collapse' });
|
|
6478
6599
|
tr = createElement('tr', { innerHTML: this.createTimelineTemplate(tier) });
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6600
|
+
if (!this.parent.pdfExportModule || (this.parent.pdfExportModule && !this.parent.pdfExportModule.isPdfExport) || (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && !this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
6601
|
+
td = createElement('th');
|
|
6602
|
+
div = createElement('div', { styles: 'width: 20px' });
|
|
6603
|
+
td.appendChild(div);
|
|
6604
|
+
tr.appendChild(td);
|
|
6605
|
+
thead.appendChild(tr);
|
|
6606
|
+
table.appendChild(thead);
|
|
6607
|
+
this.parent.ganttChartModule.chartTimelineContainer.appendChild(table);
|
|
6608
|
+
}
|
|
6486
6609
|
tier = 'bottomTier';
|
|
6487
6610
|
tr = null;
|
|
6488
6611
|
}
|
|
@@ -7315,13 +7438,16 @@ class Timeline {
|
|
|
7315
7438
|
this.parent.updateProjectDates(args.projectStartDate, args.ProjectEndDate, args.isTimelineRoundOff, isFrom);
|
|
7316
7439
|
if (type === 'prevTimeSpan' && isFrom === 'publicMethod') {
|
|
7317
7440
|
this.parent.ganttChartModule.updateScrollLeft(0);
|
|
7441
|
+
this.parent.timelineModule.isZoomToFit = false;
|
|
7318
7442
|
}
|
|
7319
7443
|
else if (type === 'nextTimeSpan' && isFrom === 'publicMethod') {
|
|
7320
7444
|
this.parent.ganttChartModule.updateScrollLeft(this.parent.timelineModule.totalTimelineWidth);
|
|
7445
|
+
this.parent.timelineModule.isZoomToFit = false;
|
|
7321
7446
|
}
|
|
7322
7447
|
else if (type === 'nextTimeSpan' && isFrom === 'TaskbarEditing') {
|
|
7323
7448
|
let currentScrollLeft = document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollLeft;
|
|
7324
7449
|
this.parent.element.querySelector('.e-timeline-header-container').scrollLeft = currentScrollLeft;
|
|
7450
|
+
this.parent.timelineModule.isZoomToFit = false;
|
|
7325
7451
|
}
|
|
7326
7452
|
this.parent.timelineModule.timeSpanActionEvent('actionComplete', type, isFrom);
|
|
7327
7453
|
}
|
|
@@ -7517,6 +7643,11 @@ class GanttTreeGrid {
|
|
|
7517
7643
|
this.wireEvents();
|
|
7518
7644
|
}
|
|
7519
7645
|
composeProperties() {
|
|
7646
|
+
this.parent.treeGrid.hasChildMapping = this.parent.taskFields.hasChildMapping;
|
|
7647
|
+
this.parent.treeGrid.loadChildOnDemand = this.parent.loadChildOnDemand;
|
|
7648
|
+
this.parent.treeGrid['isFromGantt'] = true;
|
|
7649
|
+
this.parent.treeGrid.parentIdMapping = this.parent.taskFields.parentID;
|
|
7650
|
+
this.parent.treeGrid.idMapping = this.parent.taskFields.id;
|
|
7520
7651
|
this.parent.treeGrid.showColumnMenu = this.parent.showColumnMenu;
|
|
7521
7652
|
this.parent.treeGrid.enableCollapseAll = this.parent.collapseAllParentTasks;
|
|
7522
7653
|
this.parent.treeGrid.columnMenuItems = this.parent.columnMenuItems;
|
|
@@ -7533,8 +7664,14 @@ class GanttTreeGrid {
|
|
|
7533
7664
|
this.parent.treeGrid.dataSource = { result: this.parent.flatData, count: count };
|
|
7534
7665
|
}
|
|
7535
7666
|
else {
|
|
7536
|
-
this.parent.treeGrid.hasChildMapping
|
|
7537
|
-
|
|
7667
|
+
if (!this.parent.treeGrid.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
7668
|
+
this.parent.autoCalculateDateScheduling = false;
|
|
7669
|
+
this.parent.treeGrid.dataSource = this.parent.dataSource;
|
|
7670
|
+
}
|
|
7671
|
+
else {
|
|
7672
|
+
this.parent.treeGrid.hasChildMapping = null;
|
|
7673
|
+
this.parent.treeGrid.dataSource = this.parent.flatData;
|
|
7674
|
+
}
|
|
7538
7675
|
}
|
|
7539
7676
|
this.parent.treeGrid.expandStateMapping = this.parent.taskFields.expandState;
|
|
7540
7677
|
const isGantt = 'isGantt';
|
|
@@ -7695,7 +7832,7 @@ class GanttTreeGrid {
|
|
|
7695
7832
|
collapsedArgs = this.createExpandCollapseArgs(args, null);
|
|
7696
7833
|
this.parent.ganttChartModule.collapsedGanttRow(collapsedArgs);
|
|
7697
7834
|
}
|
|
7698
|
-
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && collapsedArgs['gridRow']) {
|
|
7835
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && !this.parent.ganttChartModule.isCollapseAll && collapsedArgs['gridRow']) {
|
|
7699
7836
|
collapsedArgs['gridRow'].style.height = collapsedArgs['chartRow'].style.height;
|
|
7700
7837
|
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
7701
7838
|
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
@@ -7725,7 +7862,7 @@ class GanttTreeGrid {
|
|
|
7725
7862
|
expandedArgs = this.createExpandCollapseArgs(args, null);
|
|
7726
7863
|
this.parent.ganttChartModule.expandedGanttRow(expandedArgs);
|
|
7727
7864
|
}
|
|
7728
|
-
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && args['row']) {
|
|
7865
|
+
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && !this.parent.ganttChartModule.isExpandAll && args['row']) {
|
|
7729
7866
|
args['row'].style.height = this.parent.rowHeight + 'px';
|
|
7730
7867
|
this.parent.contentHeight = this.parent.enableRtl ? this.parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
7731
7868
|
this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
@@ -8289,6 +8426,9 @@ class GanttTreeGrid {
|
|
|
8289
8426
|
if (!isNullOrUndefined(ganttProp)) {
|
|
8290
8427
|
return this.parent.dataOperation.getDurationString(ganttProp.duration, ganttProp.durationUnit);
|
|
8291
8428
|
}
|
|
8429
|
+
else if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
8430
|
+
return this.parent.dataOperation.getDurationString(parseInt(data[this.parent.taskFields.duration]), this.parent.durationUnit);
|
|
8431
|
+
}
|
|
8292
8432
|
return '';
|
|
8293
8433
|
} // eslint-disable-next-line
|
|
8294
8434
|
resourceValueAccessor(field, data, column) {
|
|
@@ -8325,12 +8465,7 @@ class GanttTreeGrid {
|
|
|
8325
8465
|
}
|
|
8326
8466
|
updateScrollTop(args) {
|
|
8327
8467
|
let newScrollTop;
|
|
8328
|
-
|
|
8329
|
-
newScrollTop = getValue('top', args) - document.getElementsByClassName('e-chart-scroll-container e-content')[0]['offsetHeight'];
|
|
8330
|
-
}
|
|
8331
|
-
else {
|
|
8332
|
-
newScrollTop = getValue('top', args);
|
|
8333
|
-
}
|
|
8468
|
+
newScrollTop = getValue('top', args);
|
|
8334
8469
|
this.treeGridElement.querySelector('.e-content').scrollTop = newScrollTop;
|
|
8335
8470
|
this.previousScroll.top = this.treeGridElement.querySelector('.e-content').scrollTop;
|
|
8336
8471
|
}
|
|
@@ -8642,6 +8777,9 @@ __decorate$12([
|
|
|
8642
8777
|
__decorate$12([
|
|
8643
8778
|
Property(null)
|
|
8644
8779
|
], TaskFields.prototype, "parentID", void 0);
|
|
8780
|
+
__decorate$12([
|
|
8781
|
+
Property(null)
|
|
8782
|
+
], TaskFields.prototype, "hasChildMapping", void 0);
|
|
8645
8783
|
__decorate$12([
|
|
8646
8784
|
Property(null)
|
|
8647
8785
|
], TaskFields.prototype, "startDate", void 0);
|
|
@@ -9141,16 +9279,16 @@ class ChartRows extends DateProcessor {
|
|
|
9141
9279
|
return splitTasks;
|
|
9142
9280
|
}
|
|
9143
9281
|
getSplitTaskbarLeftResizerNode() {
|
|
9144
|
-
const lResizerLeft =
|
|
9282
|
+
const lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
|
|
9145
9283
|
const template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
9146
|
-
' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9284
|
+
' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
|
|
9147
9285
|
return template;
|
|
9148
9286
|
}
|
|
9149
9287
|
getSplitTaskbarRightResizerNode(segment) {
|
|
9150
|
-
const rResizerLeft =
|
|
9288
|
+
const rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
|
|
9151
9289
|
const template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
9152
9290
|
' style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (segment.width + rResizerLeft) + 'px;' +
|
|
9153
|
-
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9291
|
+
'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
|
|
9154
9292
|
return template;
|
|
9155
9293
|
}
|
|
9156
9294
|
getSplitProgressResizerNode(segment) {
|
|
@@ -9475,7 +9613,7 @@ class ChartRows extends DateProcessor {
|
|
|
9475
9613
|
}
|
|
9476
9614
|
else {
|
|
9477
9615
|
const template = '<div class="' + traceMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;height:' +
|
|
9478
|
-
((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);
|
|
9616
|
+
((this.parent.renderBaseline ? this.taskBarHeight : this.taskBarHeight - 6)) + 'px;position:absolute;transform: rotate(45deg);left:' + 1 + 'px;"> </div>';
|
|
9479
9617
|
milestoneNode = this.createDivElement(template);
|
|
9480
9618
|
}
|
|
9481
9619
|
return milestoneNode;
|
|
@@ -9853,16 +9991,16 @@ class ChartRows extends DateProcessor {
|
|
|
9853
9991
|
return this.createDivElement(template);
|
|
9854
9992
|
}
|
|
9855
9993
|
childTaskbarLeftResizer() {
|
|
9856
|
-
const lResizerLeft =
|
|
9994
|
+
const lResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 5 : -2;
|
|
9857
9995
|
const template = '<div class="' + taskBarLeftResizer + ' ' + icon + '"' +
|
|
9858
|
-
'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
9996
|
+
'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + lResizerLeft + 'px;height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
|
|
9859
9997
|
return this.createDivElement(template);
|
|
9860
9998
|
}
|
|
9861
9999
|
childTaskbarRightResizer() {
|
|
9862
|
-
const rResizerLeft =
|
|
10000
|
+
const rResizerLeft = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -17 : -10;
|
|
9863
10001
|
const template = '<div class="' + taskBarRightResizer + ' ' + icon + '"' +
|
|
9864
10002
|
'style="' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.templateData.ganttProperties.width + rResizerLeft) + 'px;' +
|
|
9865
|
-
'height:' + (this.taskBarHeight) + 'px;"></div>';
|
|
10003
|
+
'height:' + (this.taskBarHeight) + 'px;z-index:1"></div>';
|
|
9866
10004
|
return this.createDivElement(template);
|
|
9867
10005
|
}
|
|
9868
10006
|
childTaskbarProgressResizer() {
|
|
@@ -9876,8 +10014,10 @@ class ChartRows extends DateProcessor {
|
|
|
9876
10014
|
}
|
|
9877
10015
|
getLeftPointNode() {
|
|
9878
10016
|
const data = this.templateData;
|
|
9879
|
-
|
|
9880
|
-
|
|
10017
|
+
let left = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 12 : 0;
|
|
10018
|
+
let mileStoneLeftValue = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 6 : 3;
|
|
10019
|
+
const pointerLeft = -(3 + this.connectorPointWidth + left);
|
|
10020
|
+
const mileStoneLeft = -(this.connectorPointWidth + 4 + mileStoneLeftValue);
|
|
9881
10021
|
const pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9882
10022
|
let marginTop;
|
|
9883
10023
|
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
@@ -9896,7 +10036,8 @@ class ChartRows extends DateProcessor {
|
|
|
9896
10036
|
}
|
|
9897
10037
|
getRightPointNode() {
|
|
9898
10038
|
const data = this.templateData;
|
|
9899
|
-
|
|
10039
|
+
let right = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? -12 : 0;
|
|
10040
|
+
const pointerRight = -(3 + right);
|
|
9900
10041
|
const pointerTop = Math.floor(this.milesStoneRadius - (this.connectorPointWidth / 2));
|
|
9901
10042
|
let marginTop;
|
|
9902
10043
|
if ((!this.templateData.ganttProperties.isAutoSchedule && this.templateData.hasChildRecords) && this.parent.allowParentDependency) {
|
|
@@ -9906,7 +10047,7 @@ class ChartRows extends DateProcessor {
|
|
|
9906
10047
|
marginTop = 'margin-top:' + this.connectorPointMargin + 'px';
|
|
9907
10048
|
}
|
|
9908
10049
|
const template = '<div class="' + rightConnectorPointOuterDiv + '" style="' +
|
|
9909
|
-
((data.ganttProperties.isMilestone) ? ('left:' + (this.milestoneHeight - 2) + 'px;margin-top:' +
|
|
10050
|
+
((data.ganttProperties.isMilestone) ? ('left:' + ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.milestoneHeight + 5) : this.milestoneHeight - 2) + 'px;margin-top:' +
|
|
9910
10051
|
pointerTop + 'px;') : ('left:' + (data.ganttProperties.width + pointerRight) + 'px;' + marginTop + ';')) + '">' +
|
|
9911
10052
|
'<div class="' + connectorPointRight + ' ' + this.parent.getUnscheduledTaskClass(data.ganttProperties) +
|
|
9912
10053
|
'" style="width:' + this.connectorPointWidth + 'px;height:' + this.connectorPointWidth + 'px;">' +
|
|
@@ -10079,7 +10220,7 @@ class ChartRows extends DateProcessor {
|
|
|
10079
10220
|
* @private
|
|
10080
10221
|
*/
|
|
10081
10222
|
initChartHelperPrivateVariable() {
|
|
10082
|
-
let taskbarHeightValue = this.parent.renderBaseline ? 0.45 : 0.62;
|
|
10223
|
+
let taskbarHeightValue = this.parent.renderBaseline ? 0.45 : ((!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? 0.7 : 0.62);
|
|
10083
10224
|
let taskBarMarginTopValue = this.parent.renderBaseline ? 4 : 2;
|
|
10084
10225
|
let milestoneHeightValue = this.parent.renderBaseline ? 1.13 : 0.82;
|
|
10085
10226
|
this.baselineColor = !isNullOrUndefined(this.parent.baselineColor) &&
|
|
@@ -10101,8 +10242,8 @@ class ChartRows extends DateProcessor {
|
|
|
10101
10242
|
this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
|
|
10102
10243
|
this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
|
|
10103
10244
|
this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
|
|
10104
|
-
this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) :
|
|
10105
|
-
this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2))
|
|
10245
|
+
this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 8;
|
|
10246
|
+
this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
|
|
10106
10247
|
}
|
|
10107
10248
|
/**
|
|
10108
10249
|
* Function used to refresh Gantt rows.
|
|
@@ -10390,8 +10531,20 @@ class ChartRows extends DateProcessor {
|
|
|
10390
10531
|
const dataSource = this.parent.treeGrid.getCurrentViewRecords();
|
|
10391
10532
|
const visualData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
10392
10533
|
getValue('virtualScrollModule.visualData', this.parent.treeGrid) : dataSource;
|
|
10393
|
-
|
|
10394
|
-
|
|
10534
|
+
let index;
|
|
10535
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
10536
|
+
let gridData = this.parent.treeGrid.grid.contentModule['rows'];
|
|
10537
|
+
const data = gridData.filter((x) => {
|
|
10538
|
+
if (x['data'][this.parent.taskFields.id] === tempTemplateData.ganttProperties.taskId) {
|
|
10539
|
+
return x;
|
|
10540
|
+
}
|
|
10541
|
+
})[0];
|
|
10542
|
+
tRow.setAttribute('aria-rowindex', data['index'].toString());
|
|
10543
|
+
}
|
|
10544
|
+
else {
|
|
10545
|
+
index = visualData.indexOf(tempTemplateData);
|
|
10546
|
+
tRow.setAttribute('aria-rowindex', index.toString());
|
|
10547
|
+
}
|
|
10395
10548
|
}
|
|
10396
10549
|
/**
|
|
10397
10550
|
* To trigger query taskbar info event.
|
|
@@ -10766,8 +10919,11 @@ class ChartRows extends DateProcessor {
|
|
|
10766
10919
|
this.triggerQueryTaskbarInfoByIndex(tr, data);
|
|
10767
10920
|
}
|
|
10768
10921
|
const dataId = this.parent.viewType === 'ProjectView' ? data.ganttProperties.taskId : data.ganttProperties.rowUniqueID;
|
|
10769
|
-
this.parent.
|
|
10770
|
-
|
|
10922
|
+
if (!this.parent.ganttChartModule.isExpandAll && !this.parent.ganttChartModule.isCollapseAll) {
|
|
10923
|
+
this.parent.treeGrid.grid.setRowData(dataId, data);
|
|
10924
|
+
}
|
|
10925
|
+
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar && !this.parent.allowTaskbarOverlap &&
|
|
10926
|
+
!this.parent.ganttChartModule.isCollapseAll && !this.parent.ganttChartModule.isExpandAll) {
|
|
10771
10927
|
this.updateDragDropRecords(selectedItem, tr);
|
|
10772
10928
|
}
|
|
10773
10929
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && this.parent.showOverAllocation && !this.parent.allowTaskbarOverlap) {
|
|
@@ -10960,6 +11116,7 @@ class Dependency {
|
|
|
10960
11116
|
this.parentRecord = [];
|
|
10961
11117
|
this.parentIds = [];
|
|
10962
11118
|
this.parentPredecessors = [];
|
|
11119
|
+
this.validatedParentIds = [];
|
|
10963
11120
|
this.parent = gantt;
|
|
10964
11121
|
this.dateValidateModule = this.parent.dateValidationModule;
|
|
10965
11122
|
}
|
|
@@ -11573,14 +11730,32 @@ class Dependency {
|
|
|
11573
11730
|
* @private
|
|
11574
11731
|
*/
|
|
11575
11732
|
createConnectorLinesCollection(records) {
|
|
11576
|
-
|
|
11733
|
+
let ganttRecords = records ? records : this.parent.currentViewData;
|
|
11734
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
11735
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
11736
|
+
ganttRecords = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneCurrentViewData'];
|
|
11737
|
+
}
|
|
11577
11738
|
const recordLength = ganttRecords.length;
|
|
11578
11739
|
let count;
|
|
11579
11740
|
let ganttRecord;
|
|
11580
11741
|
let predecessorsCollection;
|
|
11581
|
-
this.parent.
|
|
11582
|
-
this.parent.
|
|
11742
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings &&
|
|
11743
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth && this.parent.pdfExportModule.isPdfExport) {
|
|
11744
|
+
this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
11745
|
+
this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
|
|
11746
|
+
}
|
|
11747
|
+
else {
|
|
11748
|
+
this.parent.connectorLineModule.expandedRecords = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
11749
|
+
this.parent.updatedRecords : this.parent.getExpandedRecords(this.parent.updatedRecords);
|
|
11750
|
+
}
|
|
11583
11751
|
for (count = 0; count < recordLength; count++) {
|
|
11752
|
+
if (this.parent.editModule && this.parent.editModule.deletedTaskDetails.length > 0) {
|
|
11753
|
+
if (ganttRecords[count].parentItem) {
|
|
11754
|
+
const parentItem = this.parent.getRecordByID(ganttRecords[count].parentItem.taskId.toString());
|
|
11755
|
+
this.parent.setRecordValue('parentItem', this.parent.dataOperation.getCloneParent(parentItem), ganttRecords[count]);
|
|
11756
|
+
}
|
|
11757
|
+
ganttRecords[count].index = count;
|
|
11758
|
+
}
|
|
11584
11759
|
ganttRecord = ganttRecords[count];
|
|
11585
11760
|
predecessorsCollection = ganttRecord.ganttProperties.predecessor;
|
|
11586
11761
|
if (predecessorsCollection) {
|
|
@@ -11728,36 +11903,35 @@ class Dependency {
|
|
|
11728
11903
|
this.validatePredecessor(record, undefined, 'successor');
|
|
11729
11904
|
}
|
|
11730
11905
|
}
|
|
11731
|
-
if (record && record.
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11906
|
+
if (record && !record.hasChildRecords && record.parentItem && this.validatedParentIds.indexOf(record.parentItem.taskId) == -1) {
|
|
11907
|
+
this.validatedParentIds.push(record.parentItem.taskId);
|
|
11908
|
+
}
|
|
11909
|
+
|
|
11910
|
+
let validUpdate = true;
|
|
11911
|
+
if (record && record.hasChildRecords && this.validatedParentIds.indexOf(record.ganttProperties.taskId.toString()) !== -1) {
|
|
11912
|
+
validUpdate = false;
|
|
11913
|
+
}
|
|
11914
|
+
if (validUpdate) {
|
|
11915
|
+
if (record && record.ganttProperties.taskId !== this.isValidatedParentTaskID && ganttProp) {
|
|
11916
|
+
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
11917
|
+
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
11918
|
+
this.parent.editModule['updateChildItems'](record);
|
|
11919
|
+
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
11920
|
+
}
|
|
11921
|
+
}
|
|
11922
|
+
else if ((!record.hasChildRecords && taskBarModule.taskBarEditAction == 'ChildDrag') ||
|
|
11923
|
+
(record.hasChildRecords && taskBarModule.taskBarEditAction == 'ParentDrag')) {
|
|
11745
11924
|
this.parent.editModule['updateChildItems'](record);
|
|
11746
11925
|
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
11747
11926
|
}
|
|
11927
|
+
if (!ganttProp.hasChildRecords) {
|
|
11928
|
+
this.parent.dataOperation.updateParentItems(record, true);
|
|
11929
|
+
}
|
|
11748
11930
|
}
|
|
11749
|
-
else if (
|
|
11750
|
-
(validUpdate && taskBarModule.taskBarEditAction == 'ParentDrag')) {
|
|
11931
|
+
else if (record && record.hasChildRecords && !ganttProp) {
|
|
11751
11932
|
this.parent.editModule['updateChildItems'](record);
|
|
11752
|
-
this.isValidatedParentTaskID = record.ganttProperties.taskId;
|
|
11753
|
-
}
|
|
11754
|
-
if (!ganttProp.hasChildRecords) {
|
|
11755
|
-
this.parent.dataOperation.updateParentItems(record, true);
|
|
11756
11933
|
}
|
|
11757
11934
|
}
|
|
11758
|
-
else if (record && record.hasChildRecords && !ganttProp) {
|
|
11759
|
-
this.parent.editModule['updateChildItems'](record);
|
|
11760
|
-
}
|
|
11761
11935
|
}
|
|
11762
11936
|
}
|
|
11763
11937
|
/**
|
|
@@ -11838,7 +12012,7 @@ class ConnectorLine {
|
|
|
11838
12012
|
}
|
|
11839
12013
|
getTaskbarMidpoint(isMilestone) {
|
|
11840
12014
|
return Math.floor(isMilestone ?
|
|
11841
|
-
(this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2))
|
|
12015
|
+
(this.parent.chartRowsModule.milestoneMarginTop + (this.parent.chartRowsModule.milestoneHeight / 2)) :
|
|
11842
12016
|
(this.parent.chartRowsModule.taskBarMarginTop + (this.parent.chartRowsModule.taskBarHeight / 2))) + 1;
|
|
11843
12017
|
}
|
|
11844
12018
|
/**
|
|
@@ -11852,14 +12026,45 @@ class ConnectorLine {
|
|
|
11852
12026
|
*/
|
|
11853
12027
|
createConnectorLineObject(parentGanttData, childGanttData, predecessor) {
|
|
11854
12028
|
const connectorObj = {};
|
|
11855
|
-
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
|
|
12029
|
+
let updatedRecords;
|
|
12030
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
12031
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
12032
|
+
updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
|
|
12033
|
+
this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.expandedRecords;
|
|
12034
|
+
}
|
|
12035
|
+
else {
|
|
12036
|
+
updatedRecords = this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport ?
|
|
12037
|
+
this.parent.flatData : this.expandedRecords;
|
|
12038
|
+
}
|
|
12039
|
+
let parentIndex;
|
|
12040
|
+
let childIndex;
|
|
12041
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
12042
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
12043
|
+
let parentData = this.parent.flatData.filter((data) => {
|
|
12044
|
+
return data.ganttProperties.taskId.toString() == parentGanttData.ganttProperties.taskId.toString();
|
|
12045
|
+
})[0];
|
|
12046
|
+
let childData = this.parent.flatData.filter((data) => {
|
|
12047
|
+
return data.ganttProperties.taskId.toString() == childGanttData.ganttProperties.taskId.toString();
|
|
12048
|
+
})[0];
|
|
12049
|
+
parentIndex = parentData.index;
|
|
12050
|
+
childIndex = childData.index;
|
|
12051
|
+
}
|
|
12052
|
+
else {
|
|
12053
|
+
parentIndex = updatedRecords.indexOf(parentGanttData);
|
|
12054
|
+
childIndex = updatedRecords.indexOf(childGanttData);
|
|
12055
|
+
}
|
|
11859
12056
|
const parentGanttRecord = parentGanttData.ganttProperties;
|
|
11860
12057
|
const childGanttRecord = childGanttData.ganttProperties;
|
|
11861
|
-
|
|
11862
|
-
|
|
12058
|
+
let currentData;
|
|
12059
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
12060
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
12061
|
+
currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
12062
|
+
this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'] : this.parent.getExpandedRecords(this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData']);
|
|
12063
|
+
}
|
|
12064
|
+
else {
|
|
12065
|
+
currentData = this.parent.virtualScrollModule && this.parent.enableVirtualization ?
|
|
12066
|
+
this.parent.currentViewData : this.parent.getExpandedRecords(this.parent.currentViewData);
|
|
12067
|
+
}
|
|
11863
12068
|
connectorObj.parentIndexInCurrentView = currentData.indexOf(parentGanttData);
|
|
11864
12069
|
connectorObj.childIndexInCurrentView = currentData.indexOf(childGanttData);
|
|
11865
12070
|
const isVirtualScroll = this.parent.virtualScrollModule && this.parent.enableVirtualization;
|
|
@@ -12644,8 +12849,17 @@ class ConnectorLine {
|
|
|
12644
12849
|
if (isNullOrUndefined(id)) {
|
|
12645
12850
|
return null;
|
|
12646
12851
|
}
|
|
12647
|
-
|
|
12648
|
-
this.parent.
|
|
12852
|
+
if (this.parent.pdfExportModule && this.parent.pdfExportModule.isPdfExport && this.parent.pdfExportModule.helper.exportProps &&
|
|
12853
|
+
this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings && this.parent.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
12854
|
+
let a = this.parent.pdfExportModule.helper.beforeSinglePageExport['cloneFlatData'].filter((data) => {
|
|
12855
|
+
return data.ganttProperties.taskId.toString() === id.toString();
|
|
12856
|
+
})[0];
|
|
12857
|
+
return a;
|
|
12858
|
+
}
|
|
12859
|
+
else {
|
|
12860
|
+
return this.parent.viewType === 'ResourceView' ? this.parent.flatData[this.parent.getTaskIds().indexOf('T' + id.toString())] :
|
|
12861
|
+
this.parent.flatData[this.parent.ids.indexOf(id.toString())];
|
|
12862
|
+
}
|
|
12649
12863
|
}
|
|
12650
12864
|
/**
|
|
12651
12865
|
* Method to remove connector line from DOM
|
|
@@ -12971,8 +13185,8 @@ class Tooltip$1 {
|
|
|
12971
13185
|
if (taskbarTemplateNode) {
|
|
12972
13186
|
append(taskbarTemplateNode, tooltipTemplate);
|
|
12973
13187
|
}
|
|
12974
|
-
argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate :
|
|
12975
|
-
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args);
|
|
13188
|
+
argsData.content = this.toolTipObj.content = taskbarTemplateNode ? tooltipTemplate : data ?
|
|
13189
|
+
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'taskbar'), data, parent, args) : "";
|
|
12976
13190
|
}
|
|
12977
13191
|
else if (args.target.classList.contains('e-baseline-bar') ||
|
|
12978
13192
|
args.target.classList.contains('e-baseline-gantt-milestone')) {
|
|
@@ -12984,8 +13198,8 @@ class Tooltip$1 {
|
|
|
12984
13198
|
if (baseLineTemplateNode) {
|
|
12985
13199
|
append(baseLineTemplateNode, baselineTemplate);
|
|
12986
13200
|
}
|
|
12987
|
-
argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate :
|
|
12988
|
-
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args);
|
|
13201
|
+
argsData.content = this.toolTipObj.content = baseLineTemplateNode ? baselineTemplate : data ?
|
|
13202
|
+
parent.tooltipModule.getTooltipContent((data.ganttProperties.isMilestone ? 'milestone' : 'baseline'), data, parent, args) : "";
|
|
12989
13203
|
}
|
|
12990
13204
|
else if (args.target.classList.contains('e-event-markers')) {
|
|
12991
13205
|
argsData.content = this.toolTipObj.content = parent.tooltipModule.getTooltipContent('marker', data, parent, args);
|
|
@@ -13052,7 +13266,7 @@ class Tooltip$1 {
|
|
|
13052
13266
|
// eslint-disable-next-line
|
|
13053
13267
|
tooltipCloseHandler(args) {
|
|
13054
13268
|
this.tooltipMouseEvent = null;
|
|
13055
|
-
if (!this.parent.isAdaptive) {
|
|
13269
|
+
if (!this.parent.isAdaptive && !isNullOrUndefined(this.currentTarget)) {
|
|
13056
13270
|
EventHandler.remove(this.currentTarget, 'mousemove', this.mouseMoveHandler);
|
|
13057
13271
|
}
|
|
13058
13272
|
this.currentTarget = null;
|
|
@@ -13068,34 +13282,38 @@ class Tooltip$1 {
|
|
|
13068
13282
|
*/
|
|
13069
13283
|
updateTooltipPosition(args) {
|
|
13070
13284
|
args.element.style.visibility = 'visible';
|
|
13071
|
-
|
|
13072
|
-
|
|
13073
|
-
|
|
13074
|
-
|
|
13075
|
-
|
|
13076
|
-
|
|
13077
|
-
|
|
13078
|
-
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13085
|
-
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13285
|
+
const parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
|
|
13286
|
+
if (isNullOrUndefined(parentWithZoomStyle)) {
|
|
13287
|
+
if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
|
|
13288
|
+
return;
|
|
13289
|
+
}
|
|
13290
|
+
const postion = this.getPointorPosition(this.tooltipMouseEvent);
|
|
13291
|
+
const containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
|
|
13292
|
+
const topEnd = containerPosition.top + this.parent.chartPane.offsetHeight;
|
|
13293
|
+
const leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
|
|
13294
|
+
let tooltipPositionX = postion.x;
|
|
13295
|
+
let tooltipPositionY = postion.y;
|
|
13296
|
+
if (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
|
|
13297
|
+
while (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
|
|
13298
|
+
tooltipPositionX = leftEnd - args.element.offsetWidth - 10;
|
|
13299
|
+
args.element.style.left = tooltipPositionX + 'px';
|
|
13300
|
+
}
|
|
13301
|
+
}
|
|
13302
|
+
else {
|
|
13303
|
+
tooltipPositionX = tooltipPositionX + 10;
|
|
13304
|
+
args.element.style.left = tooltipPositionX + 'px';
|
|
13305
|
+
}
|
|
13306
|
+
if (window.innerHeight < args.element.offsetHeight + tooltipPositionY) {
|
|
13307
|
+
tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
|
|
13308
|
+
}
|
|
13309
|
+
if ((topEnd < (tooltipPositionY + args.element.offsetHeight + 20))) {
|
|
13310
|
+
tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
|
|
13311
|
+
}
|
|
13312
|
+
else {
|
|
13313
|
+
tooltipPositionY = tooltipPositionY + 10;
|
|
13314
|
+
}
|
|
13315
|
+
args.element.style.top = tooltipPositionY + 'px';
|
|
13316
|
+
}
|
|
13099
13317
|
}
|
|
13100
13318
|
/**
|
|
13101
13319
|
* Method to get mouse pointor position
|
|
@@ -14028,6 +14246,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14028
14246
|
createSpinner({ target: this.element }, this.createElement);
|
|
14029
14247
|
this.trigger('load', {});
|
|
14030
14248
|
this.element.classList.add(root);
|
|
14249
|
+
this.rowHeight = (!isNullOrUndefined(document.body.className) && document.body.className.includes("e-bigger")) ? (this.rowHeight === 36) ? 46 : this.rowHeight : this.rowHeight;
|
|
14031
14250
|
if (this.isAdaptive) {
|
|
14032
14251
|
this.element.classList.add(adaptive);
|
|
14033
14252
|
}
|
|
@@ -14463,7 +14682,9 @@ let Gantt = class Gantt extends Component {
|
|
|
14463
14682
|
this.wireEvents();
|
|
14464
14683
|
this.notify('initPredessorDialog', {});
|
|
14465
14684
|
}
|
|
14466
|
-
this.
|
|
14685
|
+
if (!this.isFromOnPropertyChange) {
|
|
14686
|
+
this.splitterModule.updateSplitterPosition();
|
|
14687
|
+
}
|
|
14467
14688
|
// if (this.gridLines === 'Vertical' || this.gridLines === 'Both') {
|
|
14468
14689
|
// this.renderChartVerticalLines();
|
|
14469
14690
|
// }
|
|
@@ -14475,6 +14696,8 @@ let Gantt = class Gantt extends Component {
|
|
|
14475
14696
|
removeClass(ganttChartElement.querySelectorAll('.e-critical-milestone'), criticalMilestone);
|
|
14476
14697
|
removeClass(this.element.querySelectorAll('.e-connector-line'), criticalConnectorLineSVG);
|
|
14477
14698
|
removeClass(this.element.querySelectorAll('.e-connector-line-arrow'), criticalConnectorArrowSVG);
|
|
14699
|
+
const innerDivs = document.querySelector('.e-gantt-child-taskbar-inner-div');
|
|
14700
|
+
innerDivs.style.outlineColor = "";
|
|
14478
14701
|
}
|
|
14479
14702
|
wireEvents() {
|
|
14480
14703
|
if (this.allowKeyboard) {
|
|
@@ -14567,6 +14790,37 @@ let Gantt = class Gantt extends Component {
|
|
|
14567
14790
|
}
|
|
14568
14791
|
updateCurrentViewData() {
|
|
14569
14792
|
this.currentViewData = this.treeGrid.getCurrentViewRecords().slice();
|
|
14793
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping && this.currentViewData.length > 0) {
|
|
14794
|
+
this.autoCalculateDateScheduling = false;
|
|
14795
|
+
this.flatData = [];
|
|
14796
|
+
this.dataOperation.taskIds = [];
|
|
14797
|
+
this.ids = [];
|
|
14798
|
+
this.dataOperation.recordIndex = 0;
|
|
14799
|
+
this.dataOperation.dataArray = this.currentViewData;
|
|
14800
|
+
this.dataOperation.cloneDataSource();
|
|
14801
|
+
if (this.predecessorModule && this.taskFields.dependency) {
|
|
14802
|
+
this.predecessorModule['parentIds'] = [];
|
|
14803
|
+
this.predecessorModule['parentRecord'] = [];
|
|
14804
|
+
this.predecessorModule.updatePredecessors();
|
|
14805
|
+
}
|
|
14806
|
+
let gridData = this.treeGrid.grid.contentModule['rows'];
|
|
14807
|
+
const data = gridData.filter((x) => {
|
|
14808
|
+
if (x['data'][this.taskFields.id] === this.flatData[0].ganttProperties.taskId) {
|
|
14809
|
+
return x;
|
|
14810
|
+
}
|
|
14811
|
+
})[0];
|
|
14812
|
+
let index = data['index'];
|
|
14813
|
+
for (let i = 0; i < this.flatData.length; i++) {
|
|
14814
|
+
this.flatData[i].index = index;
|
|
14815
|
+
index++;
|
|
14816
|
+
}
|
|
14817
|
+
this.currentViewData = this.flatData;
|
|
14818
|
+
this.treeGrid.grid.currentViewData = this.flatData;
|
|
14819
|
+
if (!isNullOrUndefined(this.treeGrid['virtualScrollModule'])) {
|
|
14820
|
+
this.treeGrid['virtualScrollModule'].visualData = this.flatData;
|
|
14821
|
+
this.updatedRecords = this.flatData;
|
|
14822
|
+
}
|
|
14823
|
+
}
|
|
14570
14824
|
}
|
|
14571
14825
|
/**
|
|
14572
14826
|
* @param {IGanttData} records -Defines the delete record collections.
|
|
@@ -14586,7 +14840,7 @@ let Gantt = class Gantt extends Component {
|
|
|
14586
14840
|
* @private
|
|
14587
14841
|
*/
|
|
14588
14842
|
updateContentHeight(args) {
|
|
14589
|
-
if (!this.allowTaskbarOverlap && this.viewType === 'ResourceView' && !this.isLoad) {
|
|
14843
|
+
if ((!this.allowTaskbarOverlap && !this.ganttChartModule.isCollapseAll && !this.ganttChartModule.isExpandAll) && this.viewType === 'ResourceView' && !this.isLoad) {
|
|
14590
14844
|
return;
|
|
14591
14845
|
}
|
|
14592
14846
|
else {
|
|
@@ -14950,6 +15204,9 @@ let Gantt = class Gantt extends Component {
|
|
|
14950
15204
|
else {
|
|
14951
15205
|
this.getCurrentRecords(args);
|
|
14952
15206
|
}
|
|
15207
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
15208
|
+
this.updateContentHeight();
|
|
15209
|
+
}
|
|
14953
15210
|
if (this.enableCriticalPath && this.criticalPathModule) {
|
|
14954
15211
|
this.criticalPathModule.showCriticalPath(this.enableCriticalPath);
|
|
14955
15212
|
}
|
|
@@ -14965,6 +15222,9 @@ let Gantt = class Gantt extends Component {
|
|
|
14965
15222
|
}
|
|
14966
15223
|
this.initialChartRowElements = this.ganttChartModule.getChartRows();
|
|
14967
15224
|
this.isLoad = false;
|
|
15225
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
15226
|
+
this.autoCalculateDateScheduling = true;
|
|
15227
|
+
}
|
|
14968
15228
|
this.trigger('dataBound', args);
|
|
14969
15229
|
}
|
|
14970
15230
|
/**
|
|
@@ -15184,6 +15444,7 @@ let Gantt = class Gantt extends Component {
|
|
|
15184
15444
|
break;
|
|
15185
15445
|
case 'projectStartDate':
|
|
15186
15446
|
case 'projectEndDate':
|
|
15447
|
+
this.timelineModule.isZoomToFit = false;
|
|
15187
15448
|
this.dataOperation.calculateProjectDates();
|
|
15188
15449
|
this.updateProjectDates(this.cloneProjectStartDate, this.cloneProjectEndDate, this.isTimelineRoundOff);
|
|
15189
15450
|
break;
|
|
@@ -15227,7 +15488,14 @@ let Gantt = class Gantt extends Component {
|
|
|
15227
15488
|
if (prop === 'locale') {
|
|
15228
15489
|
this.isLocaleChanged = true;
|
|
15229
15490
|
}
|
|
15230
|
-
|
|
15491
|
+
if (prop === 'taskFields') {
|
|
15492
|
+
if (!isNullOrUndefined(newProp.taskFields.child)) {
|
|
15493
|
+
return;
|
|
15494
|
+
}
|
|
15495
|
+
}
|
|
15496
|
+
if (prop !== 'allowTaskbarDragAndDrop') {
|
|
15497
|
+
isRefresh = true;
|
|
15498
|
+
}
|
|
15231
15499
|
break;
|
|
15232
15500
|
case 'validateManualTasksOnLinking':
|
|
15233
15501
|
this.validateManualTasksOnLinking = newProp.validateManualTasksOnLinking;
|
|
@@ -15907,6 +16175,9 @@ let Gantt = class Gantt extends Component {
|
|
|
15907
16175
|
* @returns {Promise<any>} .
|
|
15908
16176
|
*/
|
|
15909
16177
|
pdfExport(pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
|
|
16178
|
+
if (pdfExportProperties && pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
|
|
16179
|
+
pdfExportProperties.pageOrientation == 'Landscape';
|
|
16180
|
+
}
|
|
15910
16181
|
return this.pdfExportModule ? this.pdfExportModule.export(pdfExportProperties, isMultipleExport, pdfDoc, isBlob)
|
|
15911
16182
|
: null;
|
|
15912
16183
|
}
|
|
@@ -15995,14 +16266,17 @@ let Gantt = class Gantt extends Component {
|
|
|
15995
16266
|
this.isTimelineRoundOff = isTimelineRoundOff;
|
|
15996
16267
|
this.timelineModule.refreshTimelineByTimeSpan();
|
|
15997
16268
|
this.dataOperation.reUpdateGanttDataPosition();
|
|
15998
|
-
this.
|
|
15999
|
-
|
|
16000
|
-
|
|
16001
|
-
|
|
16002
|
-
this.ganttChartModule.
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16269
|
+
if (!this.pdfExportModule || (this.pdfExportModule && !this.pdfExportModule.isPdfExport) || (this.pdfExportModule && this.pdfExportModule.isPdfExport && this.pdfExportModule.helper.exportProps &&
|
|
16270
|
+
this.pdfExportModule.helper.exportProps.fitToWidthSettings && !this.pdfExportModule.helper.exportProps.fitToWidthSettings.isFitToWidth)) {
|
|
16271
|
+
this.timelineModule.updateChartByNewTimeline();
|
|
16272
|
+
this.ganttChartModule.chartBodyContent.style.width = formatUnit(this.timelineModule.totalTimelineWidth);
|
|
16273
|
+
this.ganttChartModule.updateLastRowBottomWidth();
|
|
16274
|
+
if (this.taskFields.dependency) {
|
|
16275
|
+
this.ganttChartModule.reRenderConnectorLines();
|
|
16276
|
+
}
|
|
16277
|
+
if (isFrom !== 'beforeAdd') {
|
|
16278
|
+
this.notify('selectRowByIndex', {});
|
|
16279
|
+
}
|
|
16006
16280
|
}
|
|
16007
16281
|
}
|
|
16008
16282
|
/**
|
|
@@ -16308,8 +16582,11 @@ let Gantt = class Gantt extends Component {
|
|
|
16308
16582
|
}
|
|
16309
16583
|
else {
|
|
16310
16584
|
this.editModule.addRecord(data, rowPosition, rowIndex);
|
|
16585
|
+
if (rowPosition === 'Bottom') {
|
|
16586
|
+
this.selectedRowIndex = rowIndex;
|
|
16587
|
+
}
|
|
16311
16588
|
if (rowPosition === 'Above' || rowPosition === 'Below' || rowPosition === 'Child') {
|
|
16312
|
-
this.currentSelection = data;
|
|
16589
|
+
this.currentSelection = !isNullOrUndefined(data) ? data : this.currentSelection;
|
|
16313
16590
|
}
|
|
16314
16591
|
}
|
|
16315
16592
|
}
|
|
@@ -16578,7 +16855,13 @@ let Gantt = class Gantt extends Component {
|
|
|
16578
16855
|
*/
|
|
16579
16856
|
getRowByID(id) {
|
|
16580
16857
|
const record = this.getRecordByID(id.toString());
|
|
16581
|
-
|
|
16858
|
+
let index;
|
|
16859
|
+
if (!this.loadChildOnDemand && this.taskFields.hasChildMapping) {
|
|
16860
|
+
index = this.updatedRecords.map(item => item[this.taskFields.id]).indexOf(record.ganttProperties.taskId);
|
|
16861
|
+
}
|
|
16862
|
+
else {
|
|
16863
|
+
index = this.updatedRecords.indexOf(record);
|
|
16864
|
+
}
|
|
16582
16865
|
if (index !== -1) {
|
|
16583
16866
|
return this.getRowByIndex(index);
|
|
16584
16867
|
}
|
|
@@ -17039,6 +17322,9 @@ __decorate([
|
|
|
17039
17322
|
__decorate([
|
|
17040
17323
|
Property(true)
|
|
17041
17324
|
], Gantt.prototype, "enableVirtualMaskRow", void 0);
|
|
17325
|
+
__decorate([
|
|
17326
|
+
Property(false)
|
|
17327
|
+
], Gantt.prototype, "loadChildOnDemand", void 0);
|
|
17042
17328
|
__decorate([
|
|
17043
17329
|
Property(true)
|
|
17044
17330
|
], Gantt.prototype, "UpdateOffsetOnTaskbarEdit", void 0);
|
|
@@ -17542,7 +17828,7 @@ class CellEdit {
|
|
|
17542
17828
|
args.cancel = true;
|
|
17543
17829
|
return;
|
|
17544
17830
|
}
|
|
17545
|
-
if (data.hasChildRecords && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
17831
|
+
if (data.hasChildRecords && !this.parent.allowParentDependency && ((field === taskSettings.endDate && ((!isNullOrUndefined(data['isManual']) &&
|
|
17546
17832
|
data['isManual'] === false) || this.parent.taskMode === 'Auto')) || field === taskSettings.duration
|
|
17547
17833
|
|| field === taskSettings.dependency || field === taskSettings.progress || field === taskSettings.work || field === 'taskType')) {
|
|
17548
17834
|
if ((field === taskSettings.dependency && !this.parent.allowParentDependency) || field !== taskSettings.dependency) {
|
|
@@ -17841,6 +18127,9 @@ class CellEdit {
|
|
|
17841
18127
|
* @returns {void} .
|
|
17842
18128
|
*/
|
|
17843
18129
|
durationEdited(args) {
|
|
18130
|
+
if (parseInt(args.data[this.parent.taskFields.duration]) < 0) {
|
|
18131
|
+
args.data[this.parent.taskFields.duration] = 0;
|
|
18132
|
+
}
|
|
17844
18133
|
const ganttProb = args.data.ganttProperties;
|
|
17845
18134
|
const durationString = args.data[this.parent.taskFields.duration];
|
|
17846
18135
|
this.parent.dataOperation.updateDurationValue(durationString, ganttProb);
|
|
@@ -18108,14 +18397,18 @@ class EditTooltip {
|
|
|
18108
18397
|
* @returns {void} .
|
|
18109
18398
|
*/
|
|
18110
18399
|
updateTooltipPosition(args) {
|
|
18111
|
-
// const containerPosition: { top: number, left: number } = this.parent.getOffsetRect(this.parent.chartPane);
|
|
18112
|
-
// const leftEnd: number = containerPosition.left + this.parent.chartPane.offsetWidth;
|
|
18113
|
-
// let tooltipPositionX: number = args.element.offsetLeft;
|
|
18114
|
-
// if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
|
|
18115
|
-
// tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
|
|
18116
|
-
// }
|
|
18117
|
-
// args.element.style.left = tooltipPositionX + 'px';
|
|
18118
18400
|
args.element.style.visibility = 'visible';
|
|
18401
|
+
const parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
|
|
18402
|
+
if (isNullOrUndefined(parentWithZoomStyle)) {
|
|
18403
|
+
const containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
|
|
18404
|
+
const leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
|
|
18405
|
+
let tooltipPositionX = args.element.offsetLeft;
|
|
18406
|
+
if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
|
|
18407
|
+
tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
|
|
18408
|
+
}
|
|
18409
|
+
args.element.style.left = tooltipPositionX + 'px';
|
|
18410
|
+
args.element.style.visibility = 'visible';
|
|
18411
|
+
}
|
|
18119
18412
|
}
|
|
18120
18413
|
/**
|
|
18121
18414
|
* To show/hide taskbar edit tooltip.
|
|
@@ -18346,13 +18639,10 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18346
18639
|
mouseDownHandler(e) {
|
|
18347
18640
|
if (this.parent.editSettings.allowTaskbarEditing && !this.parent.readOnly) {
|
|
18348
18641
|
this.canDrag = false;
|
|
18349
|
-
if (this.
|
|
18642
|
+
if (this.taskBarEditElement) {
|
|
18350
18643
|
const targetElement = this.getElementByPosition(e);
|
|
18351
18644
|
const element = parentsUntil$1(targetElement, taskBarMainContainer);
|
|
18352
|
-
if (element && element.innerHTML === this.taskBarEditElement.innerHTML
|
|
18353
|
-
!(targetElement.classList.contains(connectorPointLeft) ||
|
|
18354
|
-
targetElement.classList.contains(connectorPointRight)) &&
|
|
18355
|
-
!this.tapPointOnFocus) {
|
|
18645
|
+
if ((element && element.innerHTML === this.taskBarEditElement.innerHTML || this.taskBarEditElement.classList.contains("e-segmented-taskbar") || this.taskBarEditElement.classList.contains("collpse-parent-border"))) {
|
|
18356
18646
|
this.updateTaskBarEditElement(e);
|
|
18357
18647
|
this.canDrag = true;
|
|
18358
18648
|
e.preventDefault();
|
|
@@ -18375,7 +18665,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18375
18665
|
}
|
|
18376
18666
|
return;
|
|
18377
18667
|
}
|
|
18378
|
-
if (this.tapPointOnFocus && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
|
|
18668
|
+
if (this.tapPointOnFocus && !isNullOrUndefined(this.taskBarEditElement) && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
|
|
18379
18669
|
this.connectorSecondRecord = this.parent.ganttChartModule.getRecordByTaskBar(element);
|
|
18380
18670
|
this.connectorSecondAction = 'ConnectorPointLeftDrag';
|
|
18381
18671
|
this.connectorSecondElement = element;
|
|
@@ -18386,8 +18676,16 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18386
18676
|
this.showHideActivePredecessors(false);
|
|
18387
18677
|
this.initPublicProp();
|
|
18388
18678
|
}
|
|
18389
|
-
else if (targetElement.classList.contains(connectorPointLeftHover)
|
|
18390
|
-
|
|
18679
|
+
else if (targetElement.classList.contains(connectorPointLeftHover)) {
|
|
18680
|
+
this.canDrag = false;
|
|
18681
|
+
this.multipleSelectionEnabled();
|
|
18682
|
+
this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
|
|
18683
|
+
this.tapPointOnFocus = true;
|
|
18684
|
+
this.taskBarEditAction = 'ConnectorPointLeftDrag';
|
|
18685
|
+
this.connectorSecondRecord = this.taskBarEditRecord;
|
|
18686
|
+
this.taskBarEditingAction(e, false);
|
|
18687
|
+
}
|
|
18688
|
+
else if (targetElement.classList.contains(connectorPointRightHover)) {
|
|
18391
18689
|
this.canDrag = false;
|
|
18392
18690
|
this.multipleSelectionEnabled();
|
|
18393
18691
|
this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
|
|
@@ -18517,7 +18815,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18517
18815
|
}
|
|
18518
18816
|
}
|
|
18519
18817
|
if (this.parent.editSettings.allowTaskbarEditing && element) {
|
|
18520
|
-
this.showHideTaskBarEditingElements(element, this.
|
|
18818
|
+
this.showHideTaskBarEditingElements(element, this.editElement);
|
|
18521
18819
|
this.editElement = element;
|
|
18522
18820
|
this.realTaskbarElement = this.editElement;
|
|
18523
18821
|
const index = this.editElement.getAttribute('data-segment-index');
|
|
@@ -18598,7 +18896,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18598
18896
|
else {
|
|
18599
18897
|
if (this.parent.isAdaptive) {
|
|
18600
18898
|
if (this.taskBarEditElement) {
|
|
18601
|
-
this.showHideTaskBarEditingElements(element, this.
|
|
18899
|
+
this.showHideTaskBarEditingElements(element, this.editElement);
|
|
18602
18900
|
}
|
|
18603
18901
|
this.initPublicProp();
|
|
18604
18902
|
}
|
|
@@ -18658,8 +18956,12 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18658
18956
|
&& isShowConnectorPoints) {
|
|
18659
18957
|
const connectorElement = !isNullOrUndefined(element.querySelector('.' + connectorPointLeft)) ?
|
|
18660
18958
|
element : element.parentElement;
|
|
18661
|
-
|
|
18662
|
-
|
|
18959
|
+
if (!isNullOrUndefined(connectorElement.querySelector('.' + connectorPointLeft))) {
|
|
18960
|
+
addClass([connectorElement.querySelector('.' + connectorPointLeft)], [connectorPointLeftHover]);
|
|
18961
|
+
}
|
|
18962
|
+
if (!isNullOrUndefined(connectorElement.querySelector('.' + connectorPointRight))) {
|
|
18963
|
+
addClass([connectorElement.querySelector('.' + connectorPointRight)], [connectorPointRightHover]);
|
|
18964
|
+
}
|
|
18663
18965
|
}
|
|
18664
18966
|
}
|
|
18665
18967
|
else if (!fadeConnectorLine) {
|
|
@@ -18786,7 +19088,8 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18786
19088
|
const item = this.taskBarEditRecord.ganttProperties;
|
|
18787
19089
|
this.previousItem = this.parent.timelineModule.extendFunction(item, this.previousItemProperty);
|
|
18788
19090
|
if (this.taskBarEditAction !== 'ConnectorPointLeftDrag' &&
|
|
18789
|
-
this.taskBarEditAction !== 'ConnectorPointRightDrag'
|
|
19091
|
+
this.taskBarEditAction !== 'ConnectorPointRightDrag' &&
|
|
19092
|
+
!(this.parent.viewType == 'ResourceView' && this.taskBarEditAction == 'ParentDrag')) {
|
|
18790
19093
|
this.editTooltip.showHideTaskbarEditTooltip(true, this.segmentIndex);
|
|
18791
19094
|
}
|
|
18792
19095
|
this.taskBarEditElement.setAttribute('aria-grabbed', 'true');
|
|
@@ -18823,6 +19126,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18823
19126
|
this.dragMouseLeave = false;
|
|
18824
19127
|
this.isMouseDragCheck();
|
|
18825
19128
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
19129
|
+
event.preventDefault();
|
|
18826
19130
|
if (!isNullOrUndefined(this.taskbarElement) && !isNullOrUndefined(this.editElement) && (this.taskBarEditAction !== "ConnectorPointRightDrag" && this.taskBarEditAction !== "ConnectorPointLeftDrag") && !(this.parent.viewType === 'ResourceView' && this.currentData.hasChildRecords)) {
|
|
18827
19131
|
var currentElement = this.editElement.parentElement;
|
|
18828
19132
|
currentElement.style.setProperty("position", "absolute");
|
|
@@ -18911,9 +19215,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18911
19215
|
this.taskBarEditAction === 'ConnectorPointRightDrag') {
|
|
18912
19216
|
this.updateConnectorLineSecondProperties(e);
|
|
18913
19217
|
this.triggerDependencyEvent(e);
|
|
18914
|
-
|
|
18915
|
-
this.drawFalseLine();
|
|
18916
|
-
}
|
|
19218
|
+
this.drawFalseLine();
|
|
18917
19219
|
}
|
|
18918
19220
|
if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
|
|
18919
19221
|
if (this.dragMoveY > this.mouseMoveY) {
|
|
@@ -18925,7 +19227,12 @@ class TaskbarEdit extends DateProcessor {
|
|
|
18925
19227
|
this.currentItemTop = this.currentItemTop + this.mouseMoveY;
|
|
18926
19228
|
}
|
|
18927
19229
|
const containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
|
|
18928
|
-
this.
|
|
19230
|
+
if (this.parent.isAdaptive || e.touches) {
|
|
19231
|
+
this.dragMoveY = e.touches[0].pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
19232
|
+
}
|
|
19233
|
+
else {
|
|
19234
|
+
this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
19235
|
+
}
|
|
18929
19236
|
this.topValue = this.currentItemTop;
|
|
18930
19237
|
this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
|
|
18931
19238
|
this.topValue == this.currentItemTop) ? this.topValue :
|
|
@@ -19311,6 +19618,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19311
19618
|
if (this.segmentIndex === 0) {
|
|
19312
19619
|
this.parent.setRecordValue('width', item.width - differenceWidth, item, true);
|
|
19313
19620
|
this.parent.setRecordValue('left', item.left + differenceWidth, item, true);
|
|
19621
|
+
segment.width = segment.width - differenceWidth;
|
|
19314
19622
|
for (let i = 1; i < item.segments.length; i++) {
|
|
19315
19623
|
const segment = segments[i];
|
|
19316
19624
|
segment.left = segment.left - differenceWidth;
|
|
@@ -19791,6 +20099,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19791
20099
|
const traceParentTaskBar$$1 = this.taskBarEditElement.querySelector('.' + traceParentTaskBar);
|
|
19792
20100
|
const traceParentProgressBar$$1 = this.taskBarEditElement.querySelector('.' + traceParentProgressBar);
|
|
19793
20101
|
const traceConnectorPointRight = this.taskBarEditElement.querySelector('.' + rightConnectorPointOuterDiv);
|
|
20102
|
+
const segmentConnectorPointRight = taskBarMainContainer$$1.querySelector('.' + rightConnectorPointOuterDiv);
|
|
19794
20103
|
const manualParentTaskbar = this.taskBarEditElement;
|
|
19795
20104
|
const manualTaskbar = this.taskBarEditElement.querySelector('.' + manualParentTaskBar);
|
|
19796
20105
|
const manualParentRight = this.taskBarEditElement.querySelector('.' + manualParentRightResizer);
|
|
@@ -19817,6 +20126,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19817
20126
|
}
|
|
19818
20127
|
taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
|
|
19819
20128
|
taskBarMainContainer$$1.style.width = (width) + 'px';
|
|
20129
|
+
if (segmentedTaskBarContainer && segmentConnectorPointRight) {
|
|
20130
|
+
segmentConnectorPointRight.style.left = (this.parent.isAdaptive ? (width + 10) : (width + 2)) + 'px';
|
|
20131
|
+
}
|
|
19820
20132
|
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
|
|
19821
20133
|
(this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
|
|
19822
20134
|
taskBarMainContainer$$1.style.setProperty('top', (this.topValue) + 'px');
|
|
@@ -19933,9 +20245,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19933
20245
|
}
|
|
19934
20246
|
if (segmentedTaskBarContainer) {
|
|
19935
20247
|
taskBarRightResizer$$1.style.setProperty(position, rightResizer + 'px');
|
|
19936
|
-
traceChildProgressBar$$1.style.width = (segment.
|
|
20248
|
+
traceChildProgressBar$$1.style.width = (segment.width) + 'px';
|
|
19937
20249
|
if (!isNullOrUndefined(childProgressResizer$$1)) {
|
|
19938
|
-
childProgressResizer$$1.style.setProperty(position, segment.
|
|
20250
|
+
childProgressResizer$$1.style.setProperty(position, segment.width - 10 + 'px');
|
|
19939
20251
|
}
|
|
19940
20252
|
}
|
|
19941
20253
|
}
|
|
@@ -20005,9 +20317,6 @@ class TaskbarEdit extends DateProcessor {
|
|
|
20005
20317
|
this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor && (!this.connectorSecondRecord.hasChildRecords ||
|
|
20006
20318
|
this.connectorSecondRecord.hasChildRecords && this.parent.allowParentDependency)) {
|
|
20007
20319
|
this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
|
|
20008
|
-
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
20009
|
-
this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
|
|
20010
|
-
}
|
|
20011
20320
|
}
|
|
20012
20321
|
else {
|
|
20013
20322
|
if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
|
|
@@ -20297,6 +20606,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
20297
20606
|
updateConnectorLineSecondProperties(e) {
|
|
20298
20607
|
const target = this.getElementByPosition(e);
|
|
20299
20608
|
const element = parentsUntil$1(target, taskBarMainContainer);
|
|
20609
|
+
const isBigger = document.body.className.includes("e-bigger");
|
|
20300
20610
|
this.connectorSecondAction = null;
|
|
20301
20611
|
let scrollTop = 0;
|
|
20302
20612
|
if (parentsUntil$1(target, connectorPointLeft)) {
|
|
@@ -20319,20 +20629,20 @@ class TaskbarEdit extends DateProcessor {
|
|
|
20319
20629
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
20320
20630
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
20321
20631
|
if (!this.parent.allowParentDependency) {
|
|
20322
|
-
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
|
|
20632
|
+
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
20323
20633
|
this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
|
|
20324
20634
|
}
|
|
20325
20635
|
else {
|
|
20326
20636
|
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
20327
|
-
this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft;
|
|
20637
|
+
this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
20328
20638
|
this.elementOffsetTop = ((this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
20329
20639
|
}
|
|
20330
20640
|
else {
|
|
20331
|
-
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
|
|
20641
|
+
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
20332
20642
|
this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
|
|
20333
20643
|
}
|
|
20334
20644
|
}
|
|
20335
|
-
this.elementOffsetWidth = this.realTaskbarElement.offsetWidth;
|
|
20645
|
+
this.elementOffsetWidth = this.realTaskbarElement.offsetWidth + ((isBigger) ? 20 : 0);
|
|
20336
20646
|
this.elementOffsetHeight = this.realTaskbarElement.offsetHeight;
|
|
20337
20647
|
}
|
|
20338
20648
|
this.showHideTaskBarEditingElements(element, this.highlightedSecondElement, true);
|
|
@@ -20440,18 +20750,16 @@ class TaskbarEdit extends DateProcessor {
|
|
|
20440
20750
|
// Get XY coordinates for touch and non-touch device
|
|
20441
20751
|
getCoordinate(event) {
|
|
20442
20752
|
const coordinates = {};
|
|
20443
|
-
|
|
20753
|
+
const e = event;
|
|
20754
|
+
coordinates.pageX = e.pageX;
|
|
20755
|
+
coordinates.pageY = e.pageY;
|
|
20756
|
+
if (event && event.type !== 'click') {
|
|
20444
20757
|
const e = event;
|
|
20445
20758
|
if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
|
|
20446
20759
|
coordinates.pageX = e.changedTouches[0].pageX;
|
|
20447
20760
|
coordinates.pageY = e.changedTouches[0].pageY;
|
|
20448
20761
|
}
|
|
20449
20762
|
}
|
|
20450
|
-
else if (event) {
|
|
20451
|
-
const e = event;
|
|
20452
|
-
coordinates.pageX = e.pageX;
|
|
20453
|
-
coordinates.pageY = e.pageY;
|
|
20454
|
-
}
|
|
20455
20763
|
return coordinates;
|
|
20456
20764
|
}
|
|
20457
20765
|
// Get current target element by mouse position
|
|
@@ -21399,7 +21707,7 @@ class DialogEdit {
|
|
|
21399
21707
|
if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
|
|
21400
21708
|
this.updateScheduleFields(dialog, ganttProp, 'endDate');
|
|
21401
21709
|
}
|
|
21402
|
-
if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName) {
|
|
21710
|
+
if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName || ganttProp.duration >= 0) {
|
|
21403
21711
|
this.updateScheduleFields(dialog, ganttProp, 'duration');
|
|
21404
21712
|
}
|
|
21405
21713
|
if (!isNullOrUndefined(tasks.work) && tasks.work !== colName) {
|
|
@@ -21557,17 +21865,33 @@ class DialogEdit {
|
|
|
21557
21865
|
const ganttProp = currentData.ganttProperties;
|
|
21558
21866
|
const taskSettings = ganttObj.taskFields;
|
|
21559
21867
|
if (taskSettings.duration === columnName) {
|
|
21560
|
-
if (!isNullOrUndefined(value) && value !== '') {
|
|
21868
|
+
if (!isNullOrUndefined(value) && value !== '' && parseInt(value) >= 0) {
|
|
21561
21869
|
ganttObj.dataOperation.updateDurationValue(value, ganttProp);
|
|
21562
21870
|
this.parent.setRecordValue(taskSettings.duration, value, currentData);
|
|
21563
21871
|
this.parent.setRecordValue('taskData.' + taskSettings.duration, ganttProp.duration, currentData);
|
|
21872
|
+
this.validateDuration(currentData);
|
|
21564
21873
|
}
|
|
21565
21874
|
else {
|
|
21566
21875
|
if (ganttObj.allowUnscheduledTasks) {
|
|
21567
|
-
|
|
21876
|
+
if ((ganttProp.startDate && ganttProp.endDate && ganttProp.startDate.getTime() > ganttProp.endDate.getTime()) || value.indexOf('-') !== -1) {
|
|
21877
|
+
this.parent.setRecordValue('duration', 0, ganttProp, true);
|
|
21878
|
+
if (ganttProp.endDate) {
|
|
21879
|
+
this.parent.setRecordValue('startDate', ganttProp.endDate, ganttProp, true);
|
|
21880
|
+
}
|
|
21881
|
+
}
|
|
21882
|
+
else {
|
|
21883
|
+
if (value === "") {
|
|
21884
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
21885
|
+
if (ganttProp.endDate) {
|
|
21886
|
+
this.parent.setRecordValue('endDate', null, ganttProp, true);
|
|
21887
|
+
}
|
|
21888
|
+
}
|
|
21889
|
+
else {
|
|
21890
|
+
this.parent.setRecordValue('duration', ganttProp.duration, ganttProp, true);
|
|
21891
|
+
}
|
|
21892
|
+
}
|
|
21568
21893
|
}
|
|
21569
21894
|
}
|
|
21570
|
-
this.validateDuration(currentData);
|
|
21571
21895
|
this.parent.editModule.updateResourceRelatedFields(currentData, 'duration');
|
|
21572
21896
|
}
|
|
21573
21897
|
if (taskSettings.startDate === columnName) {
|
|
@@ -21575,13 +21899,15 @@ class DialogEdit {
|
|
|
21575
21899
|
let startDate = this.parent.dateValidationModule.getDateFromFormat(value);
|
|
21576
21900
|
startDate = this.parent.dateValidationModule.checkStartDate(startDate, ganttProp);
|
|
21577
21901
|
this.parent.setRecordValue('startDate', startDate, ganttProp, true);
|
|
21902
|
+
this.validateStartDate(currentData);
|
|
21578
21903
|
}
|
|
21579
21904
|
else {
|
|
21580
21905
|
if (ganttObj.allowUnscheduledTasks && !(currentData.hasChildRecords)) {
|
|
21581
21906
|
this.parent.setRecordValue('startDate', null, ganttProp, true);
|
|
21907
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
21908
|
+
this.parent.setRecordValue('isMilestone', false, ganttProp, true);
|
|
21582
21909
|
}
|
|
21583
21910
|
}
|
|
21584
|
-
this.validateStartDate(currentData);
|
|
21585
21911
|
}
|
|
21586
21912
|
if (taskSettings.endDate === columnName) {
|
|
21587
21913
|
if (value !== '') {
|
|
@@ -21596,13 +21922,15 @@ class DialogEdit {
|
|
|
21596
21922
|
if (isNullOrUndefined(ganttProp.startDate) || endDate.getTime() > (ganttProp.startDate).getTime()) {
|
|
21597
21923
|
this.parent.setRecordValue('endDate', endDate, ganttProp, true);
|
|
21598
21924
|
}
|
|
21925
|
+
this.validateEndDate(currentData);
|
|
21599
21926
|
}
|
|
21600
21927
|
else {
|
|
21601
21928
|
if (ganttObj.allowUnscheduledTasks) {
|
|
21602
21929
|
this.parent.setRecordValue('endDate', null, ganttProp, true);
|
|
21930
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
21931
|
+
this.parent.setRecordValue('isMilestone', false, ganttProp, true);
|
|
21603
21932
|
}
|
|
21604
21933
|
}
|
|
21605
|
-
this.validateEndDate(currentData);
|
|
21606
21934
|
}
|
|
21607
21935
|
if (taskSettings.work === columnName) {
|
|
21608
21936
|
if (!isNullOrUndefined(value) && value !== '') {
|
|
@@ -22004,7 +22332,7 @@ class DialogEdit {
|
|
|
22004
22332
|
let eDate = getValue('endDate', selectedItem);
|
|
22005
22333
|
let duration = getValue('duration', selectedItem);
|
|
22006
22334
|
const startDate = !isNullOrUndefined(gridData) && gridData.length > 0 ?
|
|
22007
|
-
!isNullOrUndefined(taskFields.endDate) ? new Date(getValue('endDate', gridData[0]).getTime()) :
|
|
22335
|
+
(!isNullOrUndefined(taskFields.endDate) && !isNullOrUndefined(gridData[0].endDate)) ? new Date(getValue('endDate', gridData[0]).getTime()) :
|
|
22008
22336
|
new Date(getValue('startDate', gridData[0]).getTime()) :
|
|
22009
22337
|
!isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate) &&
|
|
22010
22338
|
new Date(this.beforeOpenArgs.rowData.ganttProperties.startDate.getTime());
|
|
@@ -24183,6 +24511,11 @@ class Edit$2 {
|
|
|
24183
24511
|
const ganttPropByMapping = getSwapKey(ganttObj.columnMapping);
|
|
24184
24512
|
const scheduleFieldNames = [];
|
|
24185
24513
|
let isScheduleValueUpdated = false;
|
|
24514
|
+
if (!isNullOrUndefined(ganttData[tasks.milestone])) {
|
|
24515
|
+
if (ganttData[tasks.milestone] === true) {
|
|
24516
|
+
ganttData[tasks.milestone] = false;
|
|
24517
|
+
}
|
|
24518
|
+
}
|
|
24186
24519
|
for (const key of Object.keys(data)) {
|
|
24187
24520
|
if ([tasks.startDate, tasks.endDate, tasks.duration].indexOf(key) !== -1) {
|
|
24188
24521
|
if (isNullOrUndefined(data[`${key}`]) && !ganttObj.allowUnscheduledTasks) {
|
|
@@ -24244,6 +24577,22 @@ class Edit$2 {
|
|
|
24244
24577
|
else if (key === tasks.cssClass) {
|
|
24245
24578
|
ganttPropKey = 'cssClass';
|
|
24246
24579
|
}
|
|
24580
|
+
else if (key === tasks.milestone) {
|
|
24581
|
+
ganttPropKey = 'isMilestone';
|
|
24582
|
+
if (!isNullOrUndefined(tasks.duration)) {
|
|
24583
|
+
const ganttProp = ganttData.ganttProperties;
|
|
24584
|
+
let durationValue = data[tasks.duration];
|
|
24585
|
+
if (value) {
|
|
24586
|
+
durationValue = 0;
|
|
24587
|
+
}
|
|
24588
|
+
else {
|
|
24589
|
+
durationValue = durationValue <= 0 ? 1 : durationValue;
|
|
24590
|
+
}
|
|
24591
|
+
ganttObj.setRecordValue(tasks.duration, durationValue, ganttData, true);
|
|
24592
|
+
ganttObj.setRecordValue('duration', durationValue, ganttProp, true);
|
|
24593
|
+
ganttObj.setRecordValue('taskData.' + tasks.duration, durationValue, ganttData);
|
|
24594
|
+
}
|
|
24595
|
+
}
|
|
24247
24596
|
else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
|
|
24248
24597
|
ganttPropKey = 'segments';
|
|
24249
24598
|
/* eslint-disable-next-line */
|
|
@@ -24643,10 +24992,11 @@ class Edit$2 {
|
|
|
24643
24992
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
24644
24993
|
}
|
|
24645
24994
|
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
24646
|
-
(args.action === "DrawConnectorLine")
|
|
24995
|
+
(args.action === "DrawConnectorLine")) {
|
|
24647
24996
|
this.updateChildItems(ganttRecord);
|
|
24648
24997
|
}
|
|
24649
24998
|
this.updateParentItemOnEditing();
|
|
24999
|
+
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
24650
25000
|
}
|
|
24651
25001
|
/** Update parent up-to zeroth level */
|
|
24652
25002
|
if (ganttRecord.parentItem) {
|
|
@@ -24659,6 +25009,10 @@ class Edit$2 {
|
|
|
24659
25009
|
this.updateParentItemOnEditing();
|
|
24660
25010
|
}
|
|
24661
25011
|
}
|
|
25012
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit && this.parent.connectorLineEditModule && args.data) {
|
|
25013
|
+
this.parent.connectorLineEditModule['calculateOffset'](args.data);
|
|
25014
|
+
}
|
|
25015
|
+
this.parent.predecessorModule['validatedParentIds'] = [];
|
|
24662
25016
|
this.initiateSaveAction(args);
|
|
24663
25017
|
}
|
|
24664
25018
|
updateParentItemOnEditing() {
|
|
@@ -24678,7 +25032,7 @@ class Edit$2 {
|
|
|
24678
25032
|
*/
|
|
24679
25033
|
updateParentChildRecord(data) {
|
|
24680
25034
|
const ganttRecord = data;
|
|
24681
|
-
if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
|
|
25035
|
+
if (ganttRecord.hasChildRecords && this.taskbarMoved && (ganttRecord[this.parent.taskFields.manual] === false || this.parent.taskMode === 'Auto') && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
|
|
24682
25036
|
this.updateChildItems(ganttRecord);
|
|
24683
25037
|
}
|
|
24684
25038
|
if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
|
|
@@ -25153,6 +25507,11 @@ class Edit$2 {
|
|
|
25153
25507
|
this.updateScheduleDatesOnEditing(args);
|
|
25154
25508
|
}
|
|
25155
25509
|
}
|
|
25510
|
+
if (this.parent.enableCriticalPath) {
|
|
25511
|
+
let criticalModule = this.parent.criticalPathModule;
|
|
25512
|
+
criticalModule.showCriticalPath(true);
|
|
25513
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
25514
|
+
}
|
|
25156
25515
|
if (!this.parent.editSettings.allowTaskbarEditing || (this.parent.editSettings.allowTaskbarEditing &&
|
|
25157
25516
|
!this.taskbarEditModule.dependencyCancel)) {
|
|
25158
25517
|
eventArgs.requestType = 'save';
|
|
@@ -25166,11 +25525,6 @@ class Edit$2 {
|
|
|
25166
25525
|
eventArgs.taskBarEditAction = args.taskBarEditAction;
|
|
25167
25526
|
}
|
|
25168
25527
|
this.endEditAction(args);
|
|
25169
|
-
if (this.parent.enableCriticalPath) {
|
|
25170
|
-
let criticalModule = this.parent.criticalPathModule;
|
|
25171
|
-
criticalModule.showCriticalPath(true);
|
|
25172
|
-
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
25173
|
-
}
|
|
25174
25528
|
this.parent.trigger('actionComplete', eventArgs);
|
|
25175
25529
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
25176
25530
|
this.parent.hideMaskRow();
|
|
@@ -25356,7 +25710,9 @@ class Edit$2 {
|
|
|
25356
25710
|
if (!this.parent.taskFields.parentID) {
|
|
25357
25711
|
const deleteRecordIDs = [];
|
|
25358
25712
|
deleteRecordIDs.push(deletedRow.ganttProperties.rowUniqueID.toString());
|
|
25359
|
-
this.parent.
|
|
25713
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
25714
|
+
this.parent.editModule.removeFromDataSource(deleteRecordIDs);
|
|
25715
|
+
}
|
|
25360
25716
|
}
|
|
25361
25717
|
const flatRecordIndex = this.parent.flatData.indexOf(deletedRow);
|
|
25362
25718
|
if (gObj.taskFields.parentID) {
|
|
@@ -26631,6 +26987,57 @@ class Edit$2 {
|
|
|
26631
26987
|
}
|
|
26632
26988
|
}
|
|
26633
26989
|
}
|
|
26990
|
+
/**
|
|
26991
|
+
* Method to update the values to client side from server side.
|
|
26992
|
+
*
|
|
26993
|
+
* @param {Object} e - Defines the new modified data from the server.
|
|
26994
|
+
* @param {ITaskAddedEventArgs} args - Defines the client side data.
|
|
26995
|
+
* @returns {void} .
|
|
26996
|
+
*/
|
|
26997
|
+
updateClientDataFromServer(e, args) {
|
|
26998
|
+
const serverReturnedValue = e.addedRecords[0];
|
|
26999
|
+
const _aLength = Object.keys(serverReturnedValue).length;
|
|
27000
|
+
for (let j = 0, _a = Object.keys(serverReturnedValue); j < _aLength; j++) {
|
|
27001
|
+
let key = _a[parseInt(j.toString(), 10)];
|
|
27002
|
+
args.data[`${key}`] = serverReturnedValue[`${key}`];
|
|
27003
|
+
}
|
|
27004
|
+
if (this.parent.taskFields.id !== null) {
|
|
27005
|
+
args.data.ganttProperties['taskId'] = serverReturnedValue[this.parent.taskFields.id];
|
|
27006
|
+
}
|
|
27007
|
+
if (this.parent.taskFields.name !== null) {
|
|
27008
|
+
args.data.ganttProperties['taskName'] = serverReturnedValue[this.parent.taskFields.name];
|
|
27009
|
+
}
|
|
27010
|
+
if (this.parent.taskFields.startDate !== null) {
|
|
27011
|
+
args.data.ganttProperties['startDate'] = serverReturnedValue[this.parent.taskFields.startDate];
|
|
27012
|
+
}
|
|
27013
|
+
if (this.parent.taskFields.endDate !== null) {
|
|
27014
|
+
args.data.ganttProperties['endDate'] = serverReturnedValue[this.parent.taskFields.endDate];
|
|
27015
|
+
}
|
|
27016
|
+
if (this.parent.taskFields.duration !== null) {
|
|
27017
|
+
args.data.ganttProperties['duration'] = parseInt(serverReturnedValue[this.parent.taskFields.duration]);
|
|
27018
|
+
}
|
|
27019
|
+
if (this.parent.taskFields.durationUnit !== null) {
|
|
27020
|
+
args.data.ganttProperties['durationUnit'] = serverReturnedValue[this.parent.taskFields.durationUnit];
|
|
27021
|
+
}
|
|
27022
|
+
if (this.parent.taskFields.progress !== null) {
|
|
27023
|
+
args.data.ganttProperties['progress'] = serverReturnedValue[this.parent.taskFields.progress];
|
|
27024
|
+
}
|
|
27025
|
+
if (this.parent.taskFields.dependency !== null) {
|
|
27026
|
+
args.data.ganttProperties['dependency'] = serverReturnedValue[this.parent.taskFields.dependency];
|
|
27027
|
+
}
|
|
27028
|
+
if (this.parent.taskFields.parentID !== null) {
|
|
27029
|
+
args.data.ganttProperties['parentID'] = serverReturnedValue[this.parent.taskFields.parentID];
|
|
27030
|
+
}
|
|
27031
|
+
if (this.parent.taskFields.baselineEndDate !== null) {
|
|
27032
|
+
args.data.ganttProperties['baselineEndDate'] = serverReturnedValue[this.parent.taskFields.baselineEndDate];
|
|
27033
|
+
}
|
|
27034
|
+
if (this.parent.taskFields.baselineStartDate !== null) {
|
|
27035
|
+
args.data.ganttProperties['baselineStartDate'] = serverReturnedValue[this.parent.taskFields.baselineStartDate];
|
|
27036
|
+
}
|
|
27037
|
+
if (this.parent.taskFields.resourceInfo !== null) {
|
|
27038
|
+
args.data.ganttProperties['resources'] = serverReturnedValue[this.parent.taskFields.resourceInfo];
|
|
27039
|
+
}
|
|
27040
|
+
}
|
|
26634
27041
|
/**
|
|
26635
27042
|
* Method to add new record.
|
|
26636
27043
|
*
|
|
@@ -26691,7 +27098,8 @@ class Edit$2 {
|
|
|
26691
27098
|
/* tslint:disable-next-line */
|
|
26692
27099
|
const query = this.parent.query instanceof Query ? this.parent.query : new Query();
|
|
26693
27100
|
const adaptor = data.adaptor;
|
|
26694
|
-
|
|
27101
|
+
const moduleName = adaptor.getModuleName();
|
|
27102
|
+
if (!(moduleName == "WebApiAdaptor" || moduleName == "ODataAdaptor" || moduleName == "ODataV4Adaptor") || data.dataSource.batchUrl) {
|
|
26695
27103
|
/* tslint:disable-next-line */
|
|
26696
27104
|
const crud = data.saveChanges(updatedData, this.parent.taskFields.id, null, query);
|
|
26697
27105
|
crud.then((e) => {
|
|
@@ -26701,6 +27109,7 @@ class Edit$2 {
|
|
|
26701
27109
|
this.parent.setRecordValue('taskData', e.addedRecords[0], args.data);
|
|
26702
27110
|
this.parent.setRecordValue(this.parent.taskFields.id, e.addedRecords[0][this.parent.taskFields.id], args.data);
|
|
26703
27111
|
this.parent.setRecordValue('rowUniqueID', e.addedRecords[0][this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
|
|
27112
|
+
this.updateClientDataFromServer(e, args);
|
|
26704
27113
|
const idsIndex = this.parent.ids.indexOf(prevID);
|
|
26705
27114
|
if (idsIndex !== -1) {
|
|
26706
27115
|
this.parent.ids[idsIndex] = e.addedRecords[0][this.parent.taskFields.id].toString();
|
|
@@ -27993,6 +28402,9 @@ class Filter$1 {
|
|
|
27993
28402
|
break;
|
|
27994
28403
|
}
|
|
27995
28404
|
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
28405
|
+
if (parentNode.parentNode instanceof HTMLDocument) {
|
|
28406
|
+
break;
|
|
28407
|
+
}
|
|
27996
28408
|
parentNode = parentNode.parentNode;
|
|
27997
28409
|
marginLeft = parentNode.style.marginLeft;
|
|
27998
28410
|
}
|
|
@@ -28417,7 +28829,20 @@ class Selection$1 {
|
|
|
28417
28829
|
* @returns {Object[]} .
|
|
28418
28830
|
*/
|
|
28419
28831
|
getSelectedRecords() {
|
|
28420
|
-
|
|
28832
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
28833
|
+
let selectedRows = [];
|
|
28834
|
+
let selectedIndexes = this.parent.selectionModule.getSelectedRowIndexes();
|
|
28835
|
+
for (let i = 0; i < selectedIndexes.length; i++) {
|
|
28836
|
+
const rec = this.parent.currentViewData.filter((data) => {
|
|
28837
|
+
return data.index == selectedIndexes[i];
|
|
28838
|
+
})[0];
|
|
28839
|
+
selectedRows.push(rec);
|
|
28840
|
+
}
|
|
28841
|
+
return selectedRows;
|
|
28842
|
+
}
|
|
28843
|
+
else {
|
|
28844
|
+
return this.parent.treeGrid.getSelectedRecords();
|
|
28845
|
+
}
|
|
28421
28846
|
}
|
|
28422
28847
|
/**
|
|
28423
28848
|
* Get the selected records for cell selection.
|
|
@@ -29071,7 +29496,15 @@ class Toolbar$3 {
|
|
|
29071
29496
|
let disableItems = [];
|
|
29072
29497
|
const edit = gObj.editSettings;
|
|
29073
29498
|
const gID = this.id;
|
|
29074
|
-
|
|
29499
|
+
let ind = gObj.selectedRowIndex;
|
|
29500
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
29501
|
+
for (let i = 0; i < gObj.updatedRecords.length; i++) {
|
|
29502
|
+
if (gObj.updatedRecords[i].index === ind) {
|
|
29503
|
+
ind = i;
|
|
29504
|
+
break;
|
|
29505
|
+
}
|
|
29506
|
+
}
|
|
29507
|
+
}
|
|
29075
29508
|
let previousGanttRecord;
|
|
29076
29509
|
const isSelected = gObj.selectionModule ? gObj.selectionModule.selectedRowIndexes.length === 1 ||
|
|
29077
29510
|
gObj.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
@@ -29601,6 +30034,7 @@ class DayMarkers {
|
|
|
29601
30034
|
/** @hidden */
|
|
29602
30035
|
class CriticalPath {
|
|
29603
30036
|
constructor(parent) {
|
|
30037
|
+
this.validatedids = [];
|
|
29604
30038
|
this.resourceCollectionIds = [];
|
|
29605
30039
|
this.criticalTasks = [];
|
|
29606
30040
|
this.parent = parent;
|
|
@@ -29627,6 +30061,7 @@ class CriticalPath {
|
|
|
29627
30061
|
const collectionTaskId = [];
|
|
29628
30062
|
const fromDataObject = [];
|
|
29629
30063
|
let criticalPathIds = [];
|
|
30064
|
+
this.criticalTasks = [];
|
|
29630
30065
|
/* eslint-disable-next-line */
|
|
29631
30066
|
if (parentRecords[0].ganttProperties.autoEndDate > parentRecords[0].ganttProperties.endDate && !parentRecords[0].ganttProperties.isAutoSchedule) {
|
|
29632
30067
|
checkEndDate = parentRecords[0].ganttProperties.autoEndDate;
|
|
@@ -29819,6 +30254,7 @@ class CriticalPath {
|
|
|
29819
30254
|
this.slackCalculation(fromDataObject, collection, collectionTaskId, checkEndDate, totalRecords, modelIds);
|
|
29820
30255
|
}
|
|
29821
30256
|
criticalPathIds = this.finalCriticalPath(collection, taskBeyondEnddate, totalRecords, modelIds, checkEndDate);
|
|
30257
|
+
this.validatedids = [];
|
|
29822
30258
|
this.criticalPathCollection = criticalPathIds;
|
|
29823
30259
|
this.detailPredecessorCollection = collection;
|
|
29824
30260
|
this.predecessorCollectionTaskIds = collectionTaskId;
|
|
@@ -30198,73 +30634,69 @@ class CriticalPath {
|
|
|
30198
30634
|
return this.parent.dataOperation.getDuration(startDate, endDate, durationUnit, record.ganttProperties.isAutoSchedule, true);
|
|
30199
30635
|
}
|
|
30200
30636
|
}
|
|
30201
|
-
|
|
30202
|
-
|
|
30203
|
-
|
|
30204
|
-
|
|
30205
|
-
|
|
30206
|
-
|
|
30207
|
-
|
|
30208
|
-
|
|
30209
|
-
|
|
30210
|
-
|
|
30211
|
-
|
|
30212
|
-
|
|
30213
|
-
|
|
30214
|
-
|
|
30215
|
-
|
|
30216
|
-
|
|
30217
|
-
|
|
30218
|
-
|
|
30219
|
-
for (let f = i.length - 1; f >= 0; f--) {
|
|
30220
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
30221
|
-
const q = modelRecordIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30222
|
-
for (let k = 0; k < indexes.length; k++) {
|
|
30223
|
-
const item = indexes[parseInt(j.toString(), 10)];
|
|
30224
|
-
if (item !== q) {
|
|
30225
|
-
indexes.push(q);
|
|
30226
|
-
}
|
|
30227
|
-
break;
|
|
30228
|
-
}
|
|
30637
|
+
updateCriticalTasks(record, criticalPathIds) {
|
|
30638
|
+
for (let i = 0; i < record.ganttProperties.predecessor.length; i++) {
|
|
30639
|
+
let fromRecord;
|
|
30640
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30641
|
+
fromRecord = this.parent.getRecordByID(record.ganttProperties.predecessor[i].from);
|
|
30642
|
+
}
|
|
30643
|
+
else {
|
|
30644
|
+
let resourceIndex = this.resourceCollectionIds.indexOf(record.ganttProperties.predecessor[i].from.toString());
|
|
30645
|
+
fromRecord = this.parent.flatData[resourceIndex];
|
|
30646
|
+
}
|
|
30647
|
+
let durationDiff;
|
|
30648
|
+
if (record.ganttProperties.endDate.getTime() >= this.maxEndDate.getTime()) {
|
|
30649
|
+
record.ganttProperties.slack = record.slack = 0 + ' ' + record.ganttProperties.durationUnit;
|
|
30650
|
+
if (record.ganttProperties.progress < 100) {
|
|
30651
|
+
record.isCritical = true;
|
|
30652
|
+
record.ganttProperties.isCritical = true;
|
|
30653
|
+
if (criticalPathIds.indexOf(parseInt(record.ganttProperties.taskId)) == -1) {
|
|
30654
|
+
criticalPathIds.push(parseInt(record.ganttProperties.taskId));
|
|
30229
30655
|
}
|
|
30230
|
-
|
|
30231
|
-
|
|
30232
|
-
|
|
30233
|
-
|
|
30234
|
-
|
|
30235
|
-
|
|
30236
|
-
|
|
30237
|
-
|
|
30238
|
-
|
|
30656
|
+
}
|
|
30657
|
+
}
|
|
30658
|
+
if (fromRecord) {
|
|
30659
|
+
if (record.ganttProperties.predecessor[i].type == 'FS') {
|
|
30660
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
30661
|
+
}
|
|
30662
|
+
else if (record.ganttProperties.predecessor[i].type == 'SS') {
|
|
30663
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.startDate, record.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
30664
|
+
}
|
|
30665
|
+
else if (record.ganttProperties.predecessor[i].type == 'FF') {
|
|
30666
|
+
durationDiff = this.parent.dataOperation.getDuration(fromRecord.ganttProperties.endDate, record.ganttProperties.endDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
30667
|
+
}
|
|
30668
|
+
else if (record.ganttProperties.predecessor[i].type == 'SF') {
|
|
30669
|
+
durationDiff = this.parent.dataOperation.getDuration(record.ganttProperties.endDate, fromRecord.ganttProperties.startDate, fromRecord.ganttProperties.durationUnit, fromRecord.ganttProperties.isAutoSchedule, true);
|
|
30670
|
+
}
|
|
30671
|
+
if (durationDiff == 0 && this.validatedids.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.taskId != record.ganttProperties.taskId) {
|
|
30672
|
+
fromRecord.ganttProperties.slack = record.ganttProperties.slack;
|
|
30673
|
+
fromRecord.slack = record.slack;
|
|
30674
|
+
fromRecord.isCritical = record.ganttProperties.isCritical;
|
|
30675
|
+
fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
|
|
30676
|
+
if (criticalPathIds.indexOf(parseInt(fromRecord.ganttProperties.taskId)) == -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
|
|
30677
|
+
this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
|
|
30678
|
+
criticalPathIds.push(parseInt(fromRecord.ganttProperties.taskId));
|
|
30679
|
+
}
|
|
30680
|
+
if (fromRecord.ganttProperties.predecessorsName) {
|
|
30681
|
+
this.updateCriticalTasks(fromRecord, criticalPathIds);
|
|
30239
30682
|
}
|
|
30240
30683
|
}
|
|
30241
30684
|
}
|
|
30242
30685
|
}
|
|
30243
|
-
|
|
30686
|
+
}
|
|
30687
|
+
/* eslint-disable-next-line */
|
|
30688
|
+
finalCriticalPath(collection, taskBeyondEnddate, flatRecords, modelRecordIds, checkEndDate) {
|
|
30689
|
+
let criticalPathIds = [];
|
|
30690
|
+
let index;
|
|
30691
|
+
let predecessorFrom;
|
|
30692
|
+
for (let x = collection.length - 1; x >= 0; x--) {
|
|
30244
30693
|
if (this.parent.viewType === 'ProjectView') {
|
|
30245
|
-
index = modelRecordIds.indexOf(
|
|
30694
|
+
index = modelRecordIds.indexOf(collection[x]['taskid'].toString());
|
|
30246
30695
|
}
|
|
30247
30696
|
else {
|
|
30248
|
-
index = this.resourceCollectionIds.indexOf(
|
|
30697
|
+
index = this.resourceCollectionIds.indexOf(collection[x]['taskid'].toString());
|
|
30249
30698
|
}
|
|
30250
30699
|
const predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
30251
|
-
if (isNullOrUndefined(predecessorLength)) {
|
|
30252
|
-
if (taskBeyondEnddate.length > 0) {
|
|
30253
|
-
for (let i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30254
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
30255
|
-
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30256
|
-
}
|
|
30257
|
-
else {
|
|
30258
|
-
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30259
|
-
}
|
|
30260
|
-
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30261
|
-
this.criticalTasks.push(flatRecords[index]);
|
|
30262
|
-
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30263
|
-
}
|
|
30264
|
-
}
|
|
30265
|
-
}
|
|
30266
|
-
break;
|
|
30267
|
-
}
|
|
30268
30700
|
const noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
30269
30701
|
for (let i = predecessorLength.length - 1; i >= 0; i--) {
|
|
30270
30702
|
let toID;
|
|
@@ -30277,6 +30709,7 @@ class CriticalPath {
|
|
|
30277
30709
|
let dateDifference;
|
|
30278
30710
|
const currentData = flatRecords[index].ganttProperties;
|
|
30279
30711
|
if (predecessorLength[i].type === 'FS') {
|
|
30712
|
+
/* eslint-disable-next-line */
|
|
30280
30713
|
if (predecessorLength[i].to != currentData.taskId.toString() || this.parent.viewType === 'ResourceView') {
|
|
30281
30714
|
/* eslint-disable-next-line */
|
|
30282
30715
|
dateDifference = this.parent.dataOperation.getDuration(currentData.endDate, flatRecords[toID].ganttProperties.startDate, currentData.durationUnit, currentData.isAutoSchedule, currentData.isMilestone);
|
|
@@ -30328,8 +30761,28 @@ class CriticalPath {
|
|
|
30328
30761
|
flatRecords[index].isCritical = true;
|
|
30329
30762
|
flatRecords[index].ganttProperties.isCritical = true;
|
|
30330
30763
|
this.criticalTasks.push(flatRecords[index]);
|
|
30331
|
-
|
|
30332
|
-
|
|
30764
|
+
if (criticalPathIds.indexOf(collection[x]['taskid']) === -1) {
|
|
30765
|
+
criticalPathIds.push(collection[x]['taskid']);
|
|
30766
|
+
}
|
|
30767
|
+
}
|
|
30768
|
+
}
|
|
30769
|
+
if (flatRecords[index].ganttProperties.predecessor.length > 0) {
|
|
30770
|
+
this.updateCriticalTasks(flatRecords[index], criticalPathIds);
|
|
30771
|
+
}
|
|
30772
|
+
}
|
|
30773
|
+
if (taskBeyondEnddate.length > 0) {
|
|
30774
|
+
for (let i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30775
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30776
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30777
|
+
}
|
|
30778
|
+
else {
|
|
30779
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30780
|
+
}
|
|
30781
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30782
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
30783
|
+
if (criticalPathIds.indexOf(taskBeyondEnddate[i]) === -1) {
|
|
30784
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30785
|
+
}
|
|
30333
30786
|
}
|
|
30334
30787
|
}
|
|
30335
30788
|
}
|
|
@@ -30374,7 +30827,7 @@ class CriticalPath {
|
|
|
30374
30827
|
}
|
|
30375
30828
|
}
|
|
30376
30829
|
/* eslint-disable-next-line */
|
|
30377
|
-
if (this.parent.allowUnscheduledTasks && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
30830
|
+
if (this.parent.allowUnscheduledTasks && criticalData && !criticalData[columnFields.startDate] && !criticalData[columnFields.endDate] && criticalData[columnFields.duration]) {
|
|
30378
30831
|
taskClass = criticalUnscheduledTask;
|
|
30379
30832
|
}
|
|
30380
30833
|
else {
|
|
@@ -30387,6 +30840,8 @@ class CriticalPath {
|
|
|
30387
30840
|
}
|
|
30388
30841
|
if (element.getElementsByClassName('e-gantt-child-taskbar-inner-div').length > 0) {
|
|
30389
30842
|
addClass(element.querySelectorAll('.e-gantt-child-taskbar-inner-div'), criticalChildTaskBarInnerDiv);
|
|
30843
|
+
const innerDivs = document.querySelector('.e-gantt-child-taskbar-inner-div');
|
|
30844
|
+
innerDivs.style.outlineColor = "";
|
|
30390
30845
|
}
|
|
30391
30846
|
if (element.getElementsByClassName('e-gantt-child-progressbar-inner-div').length > 0) {
|
|
30392
30847
|
addClass(element.querySelectorAll('.e-gantt-child-progressbar-inner-div'), taskClass);
|
|
@@ -30606,7 +31061,7 @@ class ContextMenu$2 {
|
|
|
30606
31061
|
taskfields = this.parent.taskFields;
|
|
30607
31062
|
if (!isNullOrUndefined(taskfields.duration)) {
|
|
30608
31063
|
const ganttProp = this.rowData.ganttProperties;
|
|
30609
|
-
data[taskfields.duration] =
|
|
31064
|
+
data[taskfields.duration] = data[taskfields.duration] <= 0 ? 1 : data[taskfields.duration];
|
|
30610
31065
|
}
|
|
30611
31066
|
else {
|
|
30612
31067
|
data[taskfields.startDate] = new Date(this.rowData.taskData[taskfields.startDate]);
|
|
@@ -30619,6 +31074,9 @@ class ContextMenu$2 {
|
|
|
30619
31074
|
data[taskfields.milestone] = false;
|
|
30620
31075
|
}
|
|
30621
31076
|
}
|
|
31077
|
+
if (data[taskfields.startDate]) {
|
|
31078
|
+
this.parent.setRecordValue(taskfields.startDate, this.rowData.ganttProperties.startDate, data, true);
|
|
31079
|
+
}
|
|
30622
31080
|
this.parent.updateRecordByID(data);
|
|
30623
31081
|
}
|
|
30624
31082
|
break;
|
|
@@ -31416,8 +31874,16 @@ class RowDD$1 {
|
|
|
31416
31874
|
const dragElement = this.parent.element.querySelector('.e-ganttdrag');
|
|
31417
31875
|
const ganttTop = this.parent.element.getClientRects()[0].top;
|
|
31418
31876
|
const ganttLeft = this.parent.element.getClientRects()[0].left;
|
|
31419
|
-
|
|
31420
|
-
|
|
31877
|
+
let left;
|
|
31878
|
+
let top;
|
|
31879
|
+
if (this.parent.isAdaptive) {
|
|
31880
|
+
left = args.originalEvent.event.touches[0].clientX - ganttLeft;
|
|
31881
|
+
top = args.originalEvent.event.touches[0].clientY - ganttTop;
|
|
31882
|
+
}
|
|
31883
|
+
else {
|
|
31884
|
+
left = getValue('event', args.originalEvent).clientX - ganttLeft;
|
|
31885
|
+
top = getValue('event', args.originalEvent).clientY - ganttTop;
|
|
31886
|
+
}
|
|
31421
31887
|
dragElement.style.left = left + 20 + 'px';
|
|
31422
31888
|
dragElement.style.top = top + 20 + 'px';
|
|
31423
31889
|
this.parent.trigger('rowDrag', args);
|
|
@@ -32270,6 +32736,8 @@ class PdfGanttTheme {
|
|
|
32270
32736
|
ganttStyle.taskbar.progressColor = new PdfColor(33, 82, 125);
|
|
32271
32737
|
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
32272
32738
|
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
32739
|
+
ganttStyle.taskbar.baselineColor = new PdfColor(240, 173, 78);
|
|
32740
|
+
ganttStyle.taskbar.baselineBorderColor = new PdfColor(240, 173, 78);
|
|
32273
32741
|
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
32274
32742
|
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
32275
32743
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(119, 119, 119);
|
|
@@ -32290,6 +32758,8 @@ class PdfGanttTheme {
|
|
|
32290
32758
|
ganttStyle.taskbar.progressColor = new PdfColor(0, 86, 179);
|
|
32291
32759
|
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
32292
32760
|
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
32761
|
+
ganttStyle.taskbar.baselineColor = new PdfColor(255, 193, 7);
|
|
32762
|
+
ganttStyle.taskbar.baselineBorderColor = new PdfColor(255, 193, 7);
|
|
32293
32763
|
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
32294
32764
|
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
32295
32765
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(108, 117, 125);
|
|
@@ -32312,6 +32782,8 @@ class PdfGanttTheme {
|
|
|
32312
32782
|
ganttStyle.taskbar.progressColor = new PdfColor(0, 91, 163);
|
|
32313
32783
|
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
32314
32784
|
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
32785
|
+
ganttStyle.taskbar.baselineColor = new PdfColor(216, 59, 1);
|
|
32786
|
+
ganttStyle.taskbar.baselineBorderColor = new PdfColor(216, 59, 1);
|
|
32315
32787
|
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
32316
32788
|
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
32317
32789
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(118, 118, 118);
|
|
@@ -32332,6 +32804,8 @@ class PdfGanttTheme {
|
|
|
32332
32804
|
ganttStyle.taskbar.progressColor = new PdfColor(63, 81, 181);
|
|
32333
32805
|
ganttStyle.taskbar.criticalTaskColor = new PdfColor(255, 139, 139);
|
|
32334
32806
|
ganttStyle.taskbar.criticalProgressColor = new PdfColor(255, 85, 85);
|
|
32807
|
+
ganttStyle.taskbar.baselineColor = new PdfColor(193, 87, 0);
|
|
32808
|
+
ganttStyle.taskbar.baselineBorderColor = new PdfColor(193, 87, 0);
|
|
32335
32809
|
ganttStyle.criticalConnectorLineColor = new PdfColor(255, 85, 85);
|
|
32336
32810
|
ganttStyle.taskbar.criticalTaskBorderColor = new PdfColor(255, 85, 85);
|
|
32337
32811
|
ganttStyle.taskbar.parentTaskColor = new PdfColor(132, 132, 132);
|
|
@@ -32826,7 +33300,7 @@ class PdfTreeGridLayouter extends ElementLayouter {
|
|
|
32826
33300
|
let startColumn = 0;
|
|
32827
33301
|
let endColumn = 0;
|
|
32828
33302
|
let cellWidths = 0;
|
|
32829
|
-
const availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x;
|
|
33303
|
+
const availableWidth = pointToPixel(this.currentGraphics.clientSize.width) - this.currentBounds.x;
|
|
32830
33304
|
for (let i = 0; i < this.treegrid.columns.count; i++) {
|
|
32831
33305
|
cellWidths += this.treegrid.columns.getColumn(i).width;
|
|
32832
33306
|
if (cellWidths >= availableWidth) {
|
|
@@ -33051,7 +33525,11 @@ class PdfTreeGridLayouter extends ElementLayouter {
|
|
|
33051
33525
|
row.cells.getCell(i + j).isCellMergeContinue = true;
|
|
33052
33526
|
}
|
|
33053
33527
|
}
|
|
33054
|
-
|
|
33528
|
+
let size = new SizeF(column.width, height);
|
|
33529
|
+
if (cell.columnSpan > 1) {
|
|
33530
|
+
size = new SizeF(cell.width, height);
|
|
33531
|
+
i += cell.columnSpan;
|
|
33532
|
+
}
|
|
33055
33533
|
if (!this.checkIfDefaultFormat(column.format) && this.checkIfDefaultFormat(cell.style.format)) {
|
|
33056
33534
|
cell.style.format = column.format;
|
|
33057
33535
|
}
|
|
@@ -33403,12 +33881,15 @@ class PdfTreeGrid extends PdfLayoutElement {
|
|
|
33403
33881
|
colSpan = cell.columnSpan;
|
|
33404
33882
|
currentCellIndex = j;
|
|
33405
33883
|
cell.isCellMergeStart = true;
|
|
33884
|
+
let totalColumnWidth = this.columns.columns[currentCellIndex].width;
|
|
33406
33885
|
//Set Column merges.
|
|
33407
33886
|
while (colSpan > 1) {
|
|
33408
33887
|
currentCellIndex++;
|
|
33409
33888
|
row.cells.getCell(currentCellIndex).isCellMergeContinue = true;
|
|
33410
33889
|
colSpan--;
|
|
33890
|
+
totalColumnWidth += this.columns.columns[currentCellIndex].width;
|
|
33411
33891
|
}
|
|
33892
|
+
cell.width = totalColumnWidth;
|
|
33412
33893
|
}
|
|
33413
33894
|
else if (cell.columnSpan === 1 && cell.rowSpan > 1) {
|
|
33414
33895
|
rowSpan = cell.rowSpan;
|
|
@@ -33681,11 +34162,11 @@ class PdfTreeGridCell {
|
|
|
33681
34162
|
if (this.finishedDrawingCell) {
|
|
33682
34163
|
temp = (this.remainingString === '') ? this.remainingString : this.value;
|
|
33683
34164
|
/* eslint-disable-next-line */
|
|
33684
|
-
graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
|
|
34165
|
+
graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
|
|
33685
34166
|
}
|
|
33686
34167
|
else {
|
|
33687
34168
|
/* eslint-disable-next-line */
|
|
33688
|
-
graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), innerLayoutArea.y, this.style.format);
|
|
34169
|
+
graphics.drawString(this.remainingString, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, this.style.format);
|
|
33689
34170
|
}
|
|
33690
34171
|
result = graphics.stringLayoutResult;
|
|
33691
34172
|
}
|
|
@@ -34321,8 +34802,99 @@ class PdfTreeGridColumnCollection {
|
|
|
34321
34802
|
*/
|
|
34322
34803
|
class ExportHelper {
|
|
34323
34804
|
constructor(parent) {
|
|
34805
|
+
this.totalColumnWidth = 0;
|
|
34806
|
+
this.beforeSinglePageExport = {};
|
|
34807
|
+
this.baselineHeight = 8;
|
|
34324
34808
|
this.parent = parent;
|
|
34325
34809
|
}
|
|
34810
|
+
processToFit() {
|
|
34811
|
+
this.beforeSinglePageExport['zoomingProjectStartDate'] = this.parent.zoomingProjectStartDate;
|
|
34812
|
+
this.beforeSinglePageExport['zoomingProjectEndDate'] = this.parent.zoomingProjectEndDate;
|
|
34813
|
+
this.beforeSinglePageExport['cloneProjectStartDate'] = this.parent.cloneProjectStartDate;
|
|
34814
|
+
this.beforeSinglePageExport['cloneProjectEndDate'] = this.parent.cloneProjectEndDate;
|
|
34815
|
+
this.beforeSinglePageExport['customTimelineSettings'] = extend({}, this.parent.timelineModule.customTimelineSettings, null, true);
|
|
34816
|
+
this.beforeSinglePageExport['isTimelineRoundOff'] = this.parent.isTimelineRoundOff;
|
|
34817
|
+
this.beforeSinglePageExport['topTier'] = this.parent.timelineModule.topTier;
|
|
34818
|
+
this.beforeSinglePageExport['topTierCellWidth'] = this.parent.timelineModule.topTierCellWidth;
|
|
34819
|
+
this.beforeSinglePageExport['topTierCollection'] = this.parent.timelineModule.topTierCollection;
|
|
34820
|
+
this.beforeSinglePageExport['bottomTier'] = this.parent.timelineModule.bottomTier;
|
|
34821
|
+
this.beforeSinglePageExport['bottomTierCellWidth'] = this.parent.timelineModule.bottomTierCellWidth;
|
|
34822
|
+
this.beforeSinglePageExport['bottomTierCollection'] = this.parent.timelineModule.bottomTierCollection;
|
|
34823
|
+
this.beforeSinglePageExport['totalTimelineWidth'] = this.parent.timelineModule.totalTimelineWidth;
|
|
34824
|
+
this.beforeSinglePageExport['timelineStartDate'] = this.parent.timelineModule.timelineStartDate;
|
|
34825
|
+
this.beforeSinglePageExport['timelineEndDate'] = this.parent.timelineModule.timelineEndDate;
|
|
34826
|
+
this.beforeSinglePageExport['timelineRoundOffEndDate'] = this.parent.timelineModule.timelineRoundOffEndDate;
|
|
34827
|
+
this.beforeSinglePageExport['perDayWidth'] = this.parent.perDayWidth;
|
|
34828
|
+
this.beforeSinglePageExport['updatedConnectorLineCollection'] = extend([], this.parent.updatedConnectorLineCollection, null, true);
|
|
34829
|
+
this.parent.timelineModule.isZoomToFit = true;
|
|
34830
|
+
this.parent.timelineModule.isZooming = false;
|
|
34831
|
+
if (!this.parent.zoomingProjectStartDate) {
|
|
34832
|
+
this.parent.zoomingProjectStartDate = this.parent.cloneProjectStartDate;
|
|
34833
|
+
this.parent.zoomingProjectEndDate = this.parent.cloneProjectEndDate;
|
|
34834
|
+
}
|
|
34835
|
+
if (this.parent.zoomingProjectStartDate > this.parent.cloneProjectStartDate) {
|
|
34836
|
+
this.parent.cloneProjectStartDate = new Date(this.parent.allowUnscheduledTasks ? this.parent.zoomingProjectStartDate : this.parent.cloneProjectStartDate);
|
|
34837
|
+
}
|
|
34838
|
+
this.parent.dataOperation.calculateProjectDates();
|
|
34839
|
+
const timeDifference = (this.parent.cloneProjectEndDate.getTime() - this.parent.cloneProjectStartDate.getTime());
|
|
34840
|
+
const totalDays = (timeDifference / (1000 * 3600 * 24));
|
|
34841
|
+
let chartsideWidth;
|
|
34842
|
+
let gridWidth;
|
|
34843
|
+
if (this.exportProps.fitToWidthSettings.gridWidth) {
|
|
34844
|
+
gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
|
|
34845
|
+
}
|
|
34846
|
+
if (this.exportProps.fitToWidthSettings.chartWidth) {
|
|
34847
|
+
chartsideWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
|
|
34848
|
+
}
|
|
34849
|
+
else {
|
|
34850
|
+
if (this.exportProps.fitToWidthSettings.gridWidth) {
|
|
34851
|
+
chartsideWidth = 100 - gridWidth;
|
|
34852
|
+
}
|
|
34853
|
+
else {
|
|
34854
|
+
chartsideWidth = 70;
|
|
34855
|
+
}
|
|
34856
|
+
}
|
|
34857
|
+
const pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * chartsideWidth) / 100;
|
|
34858
|
+
const chartWidth = pdfwidth;
|
|
34859
|
+
const perDayWidth = chartWidth / totalDays;
|
|
34860
|
+
let zoomingLevel;
|
|
34861
|
+
let firstValue;
|
|
34862
|
+
let secondValue;
|
|
34863
|
+
const zoomingCollections = [...this.parent.zoomingLevels];
|
|
34864
|
+
const sortedCollectons = zoomingCollections.sort((a, b) => (!a.perDayWidth && !b.perDayWidth ? 0 : (a.perDayWidth < b.perDayWidth) ? 1 : -1));
|
|
34865
|
+
if (perDayWidth === 0) { // return when the Gantt chart is not in viewable state.
|
|
34866
|
+
return;
|
|
34867
|
+
}
|
|
34868
|
+
for (let i = 0; i < sortedCollectons.length; i++) {
|
|
34869
|
+
firstValue = sortedCollectons[i];
|
|
34870
|
+
if (i === sortedCollectons.length - 1) {
|
|
34871
|
+
zoomingLevel = sortedCollectons[i];
|
|
34872
|
+
break;
|
|
34873
|
+
}
|
|
34874
|
+
else {
|
|
34875
|
+
secondValue = sortedCollectons[i + 1];
|
|
34876
|
+
}
|
|
34877
|
+
if (perDayWidth >= firstValue.perDayWidth) {
|
|
34878
|
+
zoomingLevel = sortedCollectons[i];
|
|
34879
|
+
break;
|
|
34880
|
+
}
|
|
34881
|
+
if (perDayWidth < firstValue.perDayWidth && perDayWidth > secondValue.perDayWidth) {
|
|
34882
|
+
zoomingLevel = sortedCollectons[i + 1];
|
|
34883
|
+
break;
|
|
34884
|
+
}
|
|
34885
|
+
}
|
|
34886
|
+
const newTimeline = extend({}, {}, zoomingLevel, true);
|
|
34887
|
+
this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectStartDate, true, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
|
|
34888
|
+
this.parent.timelineModule['roundOffDateToZoom'](this.parent.cloneProjectEndDate, false, perDayWidth, newTimeline.bottomTier.unit, zoomingLevel);
|
|
34889
|
+
const numberOfCells = this.parent.timelineModule['calculateNumberOfTimelineCells'](newTimeline);
|
|
34890
|
+
const scrollHeight = this.parent.pdfExportModule['pdfPageDimensions'].height; //17 is horizontal scrollbar width
|
|
34891
|
+
const contentHeight = this.parent.pdfExportModule['pdfPageDimensions'].height;
|
|
34892
|
+
const emptySpace = contentHeight <= scrollHeight ? 0 : 17;
|
|
34893
|
+
newTimeline.timelineUnitSize = Math.abs((chartWidth - emptySpace)) / numberOfCells;
|
|
34894
|
+
this.parent.timelineModule['changeTimelineSettings'](newTimeline);
|
|
34895
|
+
this.parent.timelineModule.isZoomToFit = false;
|
|
34896
|
+
this.parent.timelineModule.isZooming = false;
|
|
34897
|
+
}
|
|
34326
34898
|
/**
|
|
34327
34899
|
* @param {IGanttData[]} data .
|
|
34328
34900
|
* @param {PdfGantt} gantt .
|
|
@@ -34344,11 +34916,16 @@ class ExportHelper {
|
|
|
34344
34916
|
this.gantt.style.cellPadding.right = 0;
|
|
34345
34917
|
this.ganttStyle = this.gantt.ganttStyle;
|
|
34346
34918
|
this.gantt.borderColor = this.ganttStyle.chartGridLineColor;
|
|
34919
|
+
this.parent.pdfExportModule.isPdfExport = true;
|
|
34920
|
+
if (this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
34921
|
+
this.processToFit();
|
|
34922
|
+
}
|
|
34347
34923
|
this.processHeaderContent();
|
|
34348
34924
|
this.processGanttContent();
|
|
34349
34925
|
this.processTimeline();
|
|
34350
34926
|
this.processTaskbar();
|
|
34351
34927
|
this.processPredecessor();
|
|
34928
|
+
this.parent.pdfExportModule.isPdfExport = false;
|
|
34352
34929
|
}
|
|
34353
34930
|
processHeaderContent() {
|
|
34354
34931
|
this.rowIndex++;
|
|
@@ -34402,7 +34979,9 @@ class ExportHelper {
|
|
|
34402
34979
|
this.renderEmptyGantt();
|
|
34403
34980
|
}
|
|
34404
34981
|
else {
|
|
34405
|
-
|
|
34982
|
+
let flatData;
|
|
34983
|
+
flatData = this.flatData;
|
|
34984
|
+
flatData.forEach((data) => {
|
|
34406
34985
|
this.row = this.gantt.rows.addRow();
|
|
34407
34986
|
if (data.hasChildRecords) {
|
|
34408
34987
|
this.gantt.rows.getRow(this.rowIndex).isParentRow = true;
|
|
@@ -34411,6 +34990,9 @@ class ExportHelper {
|
|
|
34411
34990
|
else {
|
|
34412
34991
|
this.processRecordRow(data);
|
|
34413
34992
|
}
|
|
34993
|
+
if (this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
34994
|
+
this.row.height = 33.33;
|
|
34995
|
+
}
|
|
34414
34996
|
this.rowIndex++;
|
|
34415
34997
|
});
|
|
34416
34998
|
}
|
|
@@ -34461,7 +35043,7 @@ class ExportHelper {
|
|
|
34461
35043
|
else {
|
|
34462
35044
|
predecessor.connectorLineColor = this.ganttStyle.connectorLineColor;
|
|
34463
35045
|
}
|
|
34464
|
-
|
|
35046
|
+
this.ganttStyle.connectorLineColor = predecessor.connectorLineColor;
|
|
34465
35047
|
this.gantt.predecessorCollection.push(predecessor);
|
|
34466
35048
|
});
|
|
34467
35049
|
this.parent.pdfExportModule.isPdfExport = false;
|
|
@@ -34524,7 +35106,9 @@ class ExportHelper {
|
|
|
34524
35106
|
* @returns {void} .
|
|
34525
35107
|
*/
|
|
34526
35108
|
processTaskbar() {
|
|
34527
|
-
|
|
35109
|
+
let flatData;
|
|
35110
|
+
flatData = this.flatData;
|
|
35111
|
+
flatData.forEach((data) => {
|
|
34528
35112
|
const taskbar = this.gantt.taskbar.add();
|
|
34529
35113
|
const ganttProp = data.ganttProperties;
|
|
34530
35114
|
taskbar.left = ganttProp.left;
|
|
@@ -34555,7 +35139,22 @@ class ExportHelper {
|
|
|
34555
35139
|
taskbar.startDate = ganttProp.startDate;
|
|
34556
35140
|
taskbar.endDate = ganttProp.endDate;
|
|
34557
35141
|
taskbar.height = this.parent.chartRowsModule.taskBarHeight;
|
|
35142
|
+
if (this.parent.renderBaseline) {
|
|
35143
|
+
let height;
|
|
35144
|
+
if ((taskbar.height + this.baselineHeight) <= this.parent.rowHeight) {
|
|
35145
|
+
height = taskbar.height;
|
|
35146
|
+
}
|
|
35147
|
+
else {
|
|
35148
|
+
height = taskbar.height - (this.baselineHeight + 1);
|
|
35149
|
+
}
|
|
35150
|
+
taskbar.height = height;
|
|
35151
|
+
}
|
|
35152
|
+
taskbar.baselineTop = this.parent.chartRowsModule.baselineTop;
|
|
34558
35153
|
taskbar.isMilestone = ganttProp.isMilestone;
|
|
35154
|
+
taskbar.baselineStartDate = ganttProp.baselineStartDate;
|
|
35155
|
+
taskbar.baselineEndDate = ganttProp.baselineEndDate;
|
|
35156
|
+
taskbar.baselineLeft = ganttProp.baselineLeft;
|
|
35157
|
+
taskbar.baselineWidth = ganttProp.baselineWidth;
|
|
34559
35158
|
taskbar.milestoneColor = new PdfColor(this.ganttStyle.taskbar.milestoneColor);
|
|
34560
35159
|
taskbar.isParentTask = data.hasChildRecords;
|
|
34561
35160
|
if (ganttProp.isMilestone) {
|
|
@@ -34586,6 +35185,7 @@ class ExportHelper {
|
|
|
34586
35185
|
taskbar.taskColor = new PdfColor(this.ganttStyle.taskbar.criticalTaskColor);
|
|
34587
35186
|
taskbar.progressColor = new PdfColor(this.ganttStyle.taskbar.criticalProgressColor);
|
|
34588
35187
|
taskbar.taskBorderColor = new PdfColor(this.ganttStyle.taskbar.criticalTaskBorderColor);
|
|
35188
|
+
taskbar.milestoneColor = new PdfColor(this.ganttStyle.taskbar.criticalTaskColor);
|
|
34589
35189
|
}
|
|
34590
35190
|
else {
|
|
34591
35191
|
taskbar.taskColor = new PdfColor(this.ganttStyle.taskbar.taskColor);
|
|
@@ -34593,6 +35193,8 @@ class ExportHelper {
|
|
|
34593
35193
|
taskbar.taskBorderColor = new PdfColor(this.ganttStyle.taskbar.taskBorderColor);
|
|
34594
35194
|
}
|
|
34595
35195
|
}
|
|
35196
|
+
taskbar.baselineColor = new PdfColor(this.ganttStyle.taskbar.baselineColor);
|
|
35197
|
+
taskbar.baselineBorderColor = new PdfColor(this.ganttStyle.taskbar.baselineBorderColor);
|
|
34596
35198
|
taskbar.gridLineColor = new PdfColor(this.ganttStyle.chartGridLineColor);
|
|
34597
35199
|
this.gantt.taskbarCollection.push(taskbar);
|
|
34598
35200
|
const taskStyle = {};
|
|
@@ -34601,6 +35203,8 @@ class ExportHelper {
|
|
|
34601
35203
|
taskStyle.taskBorderColor = taskbar.taskBorderColor;
|
|
34602
35204
|
taskStyle.progressColor = taskbar.progressColor;
|
|
34603
35205
|
taskStyle.milestoneColor = taskbar.milestoneColor;
|
|
35206
|
+
taskStyle.baselineColor = taskbar.baselineColor;
|
|
35207
|
+
taskStyle.baselineBorderColor = taskbar.baselineBorderColor;
|
|
34604
35208
|
const args = {
|
|
34605
35209
|
taskbar: taskStyle,
|
|
34606
35210
|
data: data
|
|
@@ -34612,6 +35216,8 @@ class ExportHelper {
|
|
|
34612
35216
|
taskbar.taskBorderColor = args.taskbar.taskBorderColor;
|
|
34613
35217
|
taskbar.progressColor = args.taskbar.progressColor;
|
|
34614
35218
|
taskbar.milestoneColor = args.taskbar.milestoneColor;
|
|
35219
|
+
taskbar.baselineColor = args.taskbar.baselineColor;
|
|
35220
|
+
taskbar.baselineBorderColor = args.taskbar.baselineBorderColor;
|
|
34615
35221
|
}
|
|
34616
35222
|
});
|
|
34617
35223
|
}
|
|
@@ -34713,7 +35319,8 @@ class ExportHelper {
|
|
|
34713
35319
|
row.height = pixelToPoint(this.parent.rowHeight);
|
|
34714
35320
|
this.copyStyles(this.ganttStyle.columnHeader, row.cells.getCell(0), row.isParentRow);
|
|
34715
35321
|
const count = this.columns.length;
|
|
34716
|
-
|
|
35322
|
+
row.cells.getCell(0).value = this.parent.localeObj.getConstant('emptyRecord');
|
|
35323
|
+
this.mergeCells(1, 0, count);
|
|
34717
35324
|
}
|
|
34718
35325
|
mergeCells(rowIndex, colIndex, lastColIndex) {
|
|
34719
35326
|
this.gantt.rows.getRow(rowIndex).cells.getCell(colIndex).columnSpan = lastColIndex;
|
|
@@ -34758,6 +35365,26 @@ class ExportHelper {
|
|
|
34758
35365
|
const widths = [];
|
|
34759
35366
|
const treeColumnIndex = 0;
|
|
34760
35367
|
const tWidth = (this.pdfDoc.pageSettings.width - 82);
|
|
35368
|
+
if (this.exportProps && this.exportProps.fitToWidthSettings && this.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
35369
|
+
let gridWidth;
|
|
35370
|
+
if (this.exportProps.fitToWidthSettings.gridWidth) {
|
|
35371
|
+
gridWidth = parseInt(this.exportProps.fitToWidthSettings.gridWidth.split('%')[0]);
|
|
35372
|
+
}
|
|
35373
|
+
else {
|
|
35374
|
+
if (this.exportProps.fitToWidthSettings.chartWidth) {
|
|
35375
|
+
let chartWidth = parseInt(this.exportProps.fitToWidthSettings.chartWidth.split('%')[0]);
|
|
35376
|
+
gridWidth = 100 - chartWidth;
|
|
35377
|
+
}
|
|
35378
|
+
else {
|
|
35379
|
+
gridWidth = 30;
|
|
35380
|
+
}
|
|
35381
|
+
}
|
|
35382
|
+
const pdfwidth = (this.parent.pdfExportModule['pdfPageDimensions'].width * gridWidth) / 100;
|
|
35383
|
+
const perColumnWidth = pdfwidth / this.gantt.columns.columns.length;
|
|
35384
|
+
for (let i = 0; i < this.gantt.columns.columns.length; i++) {
|
|
35385
|
+
this.gantt.columns.getColumn(i).width = perColumnWidth;
|
|
35386
|
+
}
|
|
35387
|
+
}
|
|
34761
35388
|
if (this.totalColumnWidth > (this.pdfDoc.pageSettings.width - 82)) {
|
|
34762
35389
|
this.gantt.style.allowHorizontalOverflow = true;
|
|
34763
35390
|
}
|
|
@@ -34872,6 +35499,8 @@ class ExportValueFormatter {
|
|
|
34872
35499
|
*/
|
|
34873
35500
|
class PdfGanttTaskbarCollection {
|
|
34874
35501
|
constructor(parent) {
|
|
35502
|
+
/** Defines the task baselineHeight . */
|
|
35503
|
+
this.baselineHeight = 8;
|
|
34875
35504
|
/**
|
|
34876
35505
|
* @private
|
|
34877
35506
|
*/
|
|
@@ -34918,6 +35547,7 @@ class PdfGanttTaskbarCollection {
|
|
|
34918
35547
|
//code for while current pdf page is exceed
|
|
34919
35548
|
if (yPoint > pageSize.height) {
|
|
34920
35549
|
page = this.GetNextPage(page);
|
|
35550
|
+
page['contentWidth'] = pointToPixel(detail.endPoint - detail.startPoint);
|
|
34921
35551
|
taskGraphics = page.graphics;
|
|
34922
35552
|
startPoint.y = 0;
|
|
34923
35553
|
if (this.parent.pdfExportModule.gantt.enableHeader) {
|
|
@@ -34925,6 +35555,11 @@ class PdfGanttTaskbarCollection {
|
|
|
34925
35555
|
startPoint.y = pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60);
|
|
34926
35556
|
}
|
|
34927
35557
|
isNextPage = true;
|
|
35558
|
+
const graphics = page.graphics;
|
|
35559
|
+
const pen = new PdfPen(new PdfColor(206, 206, 206));
|
|
35560
|
+
if (page['contentWidth'] && (this.parent.gridLines == "Both" || this.parent.gridLines == "Horizontal")) {
|
|
35561
|
+
graphics.drawRectangle(pen, startPoint.x, startPoint.y, page['contentWidth'] + 0.5, rowHeight);
|
|
35562
|
+
}
|
|
34928
35563
|
}
|
|
34929
35564
|
this.drawLeftLabel(page, startPoint, detail, cumulativeWidth);
|
|
34930
35565
|
//Draw Taskbar
|
|
@@ -34948,9 +35583,13 @@ class PdfGanttTaskbarCollection {
|
|
|
34948
35583
|
if (!taskbar.isMilestone) {
|
|
34949
35584
|
const taskbarPen = new PdfPen(taskbar.taskBorderColor);
|
|
34950
35585
|
const taskBrush = new PdfSolidBrush(taskbar.taskColor);
|
|
35586
|
+
const baselinePen = new PdfPen(taskbar.baselineBorderColor);
|
|
35587
|
+
const baselineBrush = new PdfSolidBrush(taskbar.baselineColor);
|
|
34951
35588
|
const progressPen = new PdfPen(taskbar.progressColor);
|
|
34952
35589
|
const progressBrush = new PdfSolidBrush(taskbar.progressColor);
|
|
34953
|
-
const
|
|
35590
|
+
const adjustHeightforTaskbar = pixelToPoint((this.parent.rowHeight - this.height) / 2.0);
|
|
35591
|
+
var adjustHeightforBaseline = pixelToPoint((this.parent.rowHeight - this.height) / 4.5);
|
|
35592
|
+
const adjustHeight = this.parent.renderBaseline ? adjustHeightforBaseline : adjustHeightforTaskbar;
|
|
34954
35593
|
pageIndex = page.section.indexOf(page);
|
|
34955
35594
|
const startDate = isNullOrUndefined(this.unscheduleStarteDate) ? this.startDate : this.unscheduleStarteDate;
|
|
34956
35595
|
const endDate = isNullOrUndefined(this.unscheduleEndDate) ? this.endDate : this.unscheduleEndDate;
|
|
@@ -34964,6 +35603,9 @@ class PdfGanttTaskbarCollection {
|
|
|
34964
35603
|
this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
|
|
34965
35604
|
}
|
|
34966
35605
|
else {
|
|
35606
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
35607
|
+
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));
|
|
35608
|
+
}
|
|
34967
35609
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
34968
35610
|
if (this.isScheduledTask) {
|
|
34969
35611
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
@@ -34995,6 +35637,9 @@ class PdfGanttTaskbarCollection {
|
|
|
34995
35637
|
this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
|
|
34996
35638
|
}
|
|
34997
35639
|
else {
|
|
35640
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
35641
|
+
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));
|
|
35642
|
+
}
|
|
34998
35643
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
34999
35644
|
taskbar.width = taskbar.width - renderWidth;
|
|
35000
35645
|
if (this.isScheduledTask) {
|
|
@@ -35026,6 +35671,9 @@ class PdfGanttTaskbarCollection {
|
|
|
35026
35671
|
this.taskStartPoint = Object.assign({}, startPoint);
|
|
35027
35672
|
this.isStartPoint = true;
|
|
35028
35673
|
}
|
|
35674
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
35675
|
+
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));
|
|
35676
|
+
}
|
|
35029
35677
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
35030
35678
|
if (this.isScheduledTask) {
|
|
35031
35679
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
@@ -35047,6 +35695,9 @@ class PdfGanttTaskbarCollection {
|
|
|
35047
35695
|
this.taskStartPoint = Object.assign({}, startPoint);
|
|
35048
35696
|
this.isStartPoint = true;
|
|
35049
35697
|
}
|
|
35698
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
35699
|
+
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));
|
|
35700
|
+
}
|
|
35050
35701
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
|
|
35051
35702
|
if (this.isScheduledTask) {
|
|
35052
35703
|
let progressBoundsWidth = 0;
|
|
@@ -35072,6 +35723,9 @@ class PdfGanttTaskbarCollection {
|
|
|
35072
35723
|
}
|
|
35073
35724
|
else {
|
|
35074
35725
|
this.drawMilestone(page, startPoint, detail, cumulativeWidth);
|
|
35726
|
+
if (this.parent.renderBaseline && taskbar.baselineStartDate && taskbar.baselineEndDate) {
|
|
35727
|
+
this.drawMilestone(page, startPoint, detail, cumulativeWidth);
|
|
35728
|
+
}
|
|
35075
35729
|
}
|
|
35076
35730
|
this.drawRightLabel(page, startPoint, detail, cumulativeWidth);
|
|
35077
35731
|
return isNextPage;
|
|
@@ -35230,13 +35884,20 @@ class PdfGanttTaskbarCollection {
|
|
|
35230
35884
|
const pageIndex = page.section.indexOf(page);
|
|
35231
35885
|
this.taskStartPoint = Object.assign({}, startPoint);
|
|
35232
35886
|
const milestonePen = new PdfPen(this.milestoneColor);
|
|
35233
|
-
const
|
|
35887
|
+
const adjustHeightforBaselineMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 3.0));
|
|
35888
|
+
const adjustHeightforMilesone = pixelToPoint(((this.parent.rowHeight - this.height) / 2.0));
|
|
35889
|
+
const adjustHeight = this.parent.renderBaseline ? adjustHeightforBaselineMilesone : adjustHeightforMilesone;
|
|
35234
35890
|
const milestoneBrush = new PdfSolidBrush(this.milestoneColor);
|
|
35891
|
+
const baselinePen = new PdfPen(this.baselineBorderColor);
|
|
35892
|
+
const baselineBrush = new PdfSolidBrush(this.baselineColor);
|
|
35235
35893
|
taskGraphics.save(); //saving graphics state
|
|
35236
|
-
const height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.
|
|
35894
|
+
const height = Math.floor(this.parent.chartRowsModule.taskBarHeight * 0.8);
|
|
35237
35895
|
/* eslint-disable-next-line */
|
|
35238
35896
|
taskGraphics.translateTransform(startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight - (this.parent.chartRowsModule.taskBarHeight * 0.7) / 2);
|
|
35239
35897
|
taskGraphics.rotateTransform(45); //apply rotation
|
|
35898
|
+
if (this.parent.renderBaseline && this.baselineStartDate && this.baselineEndDate) {
|
|
35899
|
+
taskGraphics.drawRectangle(baselinePen, baselineBrush, 2, 2, pixelToPoint(height), pixelToPoint(height));
|
|
35900
|
+
}
|
|
35240
35901
|
taskGraphics.drawRectangle(milestonePen, milestoneBrush, 0, 0, pixelToPoint(height), pixelToPoint(height));
|
|
35241
35902
|
taskGraphics.restore(); //restoring graphics state
|
|
35242
35903
|
this.endPage = this.startPage = pageIndex;
|
|
@@ -35266,7 +35927,7 @@ class PdfTimeline {
|
|
|
35266
35927
|
* @returns {void}
|
|
35267
35928
|
*/
|
|
35268
35929
|
drawTimeline(page, startPoint, detail) {
|
|
35269
|
-
let remainWidth = Math.floor(detail.totalWidth);
|
|
35930
|
+
let remainWidth = pointToPixel(Math.floor(detail.totalWidth));
|
|
35270
35931
|
let renderWidth = 0;
|
|
35271
35932
|
this.topTierPoint.x = startPoint.x;
|
|
35272
35933
|
this.topTierPoint.y = startPoint.y;
|
|
@@ -35294,7 +35955,7 @@ class PdfTimeline {
|
|
|
35294
35955
|
//Primary header Event Arguments
|
|
35295
35956
|
/* eslint-disable-next-line */
|
|
35296
35957
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, renderWidth, pHeader.value, true);
|
|
35297
|
-
this.topTierPoint.x +=
|
|
35958
|
+
this.topTierPoint.x += renderWidth;
|
|
35298
35959
|
remainWidth -= renderWidth;
|
|
35299
35960
|
if (isCompleted) {
|
|
35300
35961
|
this.topTierIndex++;
|
|
@@ -35320,7 +35981,7 @@ class PdfTimeline {
|
|
|
35320
35981
|
//Secondary header Event Arguments
|
|
35321
35982
|
/* eslint-disable-next-line */
|
|
35322
35983
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, width, secondHeader.value, false);
|
|
35323
|
-
this.bottomTierPoint.x = this.bottomTierPoint.x +
|
|
35984
|
+
this.bottomTierPoint.x = this.bottomTierPoint.x + width;
|
|
35324
35985
|
remainWidth -= width;
|
|
35325
35986
|
secondHeader.completedWidth = width;
|
|
35326
35987
|
if (isCompleted) {
|
|
@@ -35351,7 +36012,7 @@ class PdfTimeline {
|
|
|
35351
36012
|
//Primary header Event Arguments
|
|
35352
36013
|
/* eslint-disable-next-line */
|
|
35353
36014
|
this.triggerQueryTimelinecell(page, this.topTierPoint.x, this.topTierPoint.y, this.topTierHeight, pHeader.completedWidth, pHeader.value, true);
|
|
35354
|
-
this.topTierPoint.x +=
|
|
36015
|
+
this.topTierPoint.x += pHeader.completedWidth;
|
|
35355
36016
|
}
|
|
35356
36017
|
}
|
|
35357
36018
|
}
|
|
@@ -35364,7 +36025,7 @@ class PdfTimeline {
|
|
|
35364
36025
|
//Secondary header Event Arguments
|
|
35365
36026
|
/* eslint-disable-next-line */
|
|
35366
36027
|
this.triggerQueryTimelinecell(page, this.bottomTierPoint.x, this.bottomTierPoint.y, this.bottomTierHeight, secondHeader.width, secondHeader.value, false);
|
|
35367
|
-
this.bottomTierPoint.x = this.bottomTierPoint.x +
|
|
36028
|
+
this.bottomTierPoint.x = this.bottomTierPoint.x + secondHeader.width;
|
|
35368
36029
|
}
|
|
35369
36030
|
}
|
|
35370
36031
|
}
|
|
@@ -35411,7 +36072,10 @@ class PdfTimeline {
|
|
|
35411
36072
|
const e = eventArgs.timelineCell;
|
|
35412
36073
|
const rectPen = new PdfPen(eventArgs.timelineCell.borderColor);
|
|
35413
36074
|
const rectBrush = new PdfSolidBrush(eventArgs.timelineCell.backgroundColor);
|
|
35414
|
-
graphics.drawRectangle(rectPen, rectBrush, x, y,
|
|
36075
|
+
graphics.drawRectangle(rectPen, rectBrush, x, y, width, pixelToPoint(height));
|
|
36076
|
+
if (!isTopTier && (this.parent.gridLines == "Both" || this.parent.gridLines == "Vertical")) {
|
|
36077
|
+
graphics.drawRectangle(rectPen, rectBrush, x, y + pixelToPoint(height), width, page.getClientSize().height);
|
|
36078
|
+
}
|
|
35415
36079
|
let font = new PdfStandardFont(ganttStyle.fontFamily, e.fontSize, e.fontStyle);
|
|
35416
36080
|
if (ganttStyle.font) {
|
|
35417
36081
|
font = ganttStyle.font;
|
|
@@ -35420,7 +36084,13 @@ class PdfTimeline {
|
|
|
35420
36084
|
const pLeft = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.left : 0;
|
|
35421
36085
|
const pTop = ganttStyle.timeline.padding ? eventArgs.timelineCell.padding.top : 0;
|
|
35422
36086
|
/* eslint-disable-next-line */
|
|
35423
|
-
|
|
36087
|
+
if (isTopTier) {
|
|
36088
|
+
x = x + pLeft + 4;
|
|
36089
|
+
}
|
|
36090
|
+
else {
|
|
36091
|
+
x = x + pLeft;
|
|
36092
|
+
}
|
|
36093
|
+
graphics.drawString(eventArgs.value, font, null, textBrush, x, y + pTop, pixelToPoint(width), pixelToPoint(height), e.format);
|
|
35424
36094
|
}
|
|
35425
36095
|
}
|
|
35426
36096
|
|
|
@@ -35575,7 +36245,9 @@ class PdfGanttPredecessor {
|
|
|
35575
36245
|
}
|
|
35576
36246
|
break;
|
|
35577
36247
|
}
|
|
35578
|
-
|
|
36248
|
+
const midPointforTaskbar = Math.round((this.parent.rowHeight - 1) / 2.0);
|
|
36249
|
+
const midPointforBaseline = Math.round((this.parent.rowHeight - 10) / 2.0);
|
|
36250
|
+
let midPoint = this.parent.renderBaseline ? midPointforBaseline : midPointforTaskbar;
|
|
35579
36251
|
midPoint = pixelToPoint(midPoint);
|
|
35580
36252
|
/* eslint-disable-next-line */
|
|
35581
36253
|
let point1, point2, point3, point4, point5, point6;
|
|
@@ -36038,6 +36710,7 @@ class PdfGantt extends PdfTreeGrid {
|
|
|
36038
36710
|
let pageData;
|
|
36039
36711
|
this.headerDetails.forEach((detail, index) => {
|
|
36040
36712
|
const page = this.result.page.section.getPages()[this.startPageIndex];
|
|
36713
|
+
page['contentWidth'] = pointToPixel(this.headerDetails[index].endPoint - this.headerDetails[index].startPoint);
|
|
36041
36714
|
this.chartHeader.drawTimeline(page, this.startPoint, detail);
|
|
36042
36715
|
taskbarPoint.y = taskbarPoint.y + pixelToPoint(this.parent.timelineModule.isSingleTier ? 45 : 60); // headerHeight
|
|
36043
36716
|
pageStartX = taskbarPoint.x;
|
|
@@ -36048,6 +36721,11 @@ class PdfGantt extends PdfTreeGrid {
|
|
|
36048
36721
|
const task = this.taskbarCollection[i];
|
|
36049
36722
|
const rowHeight = this.rows.getRow(i + 1).height;
|
|
36050
36723
|
const pdfPage = this.result.page.section.getPages()[this.startPageIndex];
|
|
36724
|
+
const graphics = pdfPage.graphics;
|
|
36725
|
+
const pen = new PdfPen(new PdfColor(206, 206, 206));
|
|
36726
|
+
if (page['contentWidth'] && (this.parent.gridLines == "Both" || this.parent.gridLines == "Horizontal")) {
|
|
36727
|
+
graphics.drawRectangle(pen, pageStartX, taskbarPoint.y, page['contentWidth'] + 0.5, rowHeight);
|
|
36728
|
+
}
|
|
36051
36729
|
/* eslint-disable-next-line */
|
|
36052
36730
|
const isNextPage = task.drawTaskbar(pdfPage, taskbarPoint, detail, cumulativeWidth, rowHeight, this.taskbarCollection[i]);
|
|
36053
36731
|
if (isNextPage) {
|
|
@@ -36179,11 +36857,23 @@ class PdfExport {
|
|
|
36179
36857
|
if (isNullOrUndefined(pdfExportProperties)) {
|
|
36180
36858
|
pdfExportProperties = {};
|
|
36181
36859
|
}
|
|
36182
|
-
if (pdfExportProperties.
|
|
36183
|
-
|
|
36860
|
+
if (pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
|
|
36861
|
+
if (pdfExportProperties.exportType === 'CurrentViewData') {
|
|
36862
|
+
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.currentViewData, null, true);
|
|
36863
|
+
}
|
|
36864
|
+
else {
|
|
36865
|
+
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.flatData, null, true);
|
|
36866
|
+
}
|
|
36867
|
+
this.helper.beforeSinglePageExport['cloneCurrentViewData'] = extend([], this.parent.currentViewData, null, true);
|
|
36868
|
+
data = this.helper.beforeSinglePageExport['cloneFlatData'];
|
|
36184
36869
|
}
|
|
36185
36870
|
else {
|
|
36186
|
-
|
|
36871
|
+
if (pdfExportProperties.exportType === 'CurrentViewData') {
|
|
36872
|
+
data = this.parent.currentViewData;
|
|
36873
|
+
}
|
|
36874
|
+
else {
|
|
36875
|
+
data = this.parent.flatData;
|
|
36876
|
+
}
|
|
36187
36877
|
}
|
|
36188
36878
|
this.initGantt();
|
|
36189
36879
|
if (!isNullOrUndefined(pdfDoc)) {
|
|
@@ -36207,6 +36897,7 @@ class PdfExport {
|
|
|
36207
36897
|
const section = this.pdfDocument.sections.add();
|
|
36208
36898
|
this.processSectionExportProperties(section, pdfExportProperties);
|
|
36209
36899
|
const pdfPage = section.pages.add();
|
|
36900
|
+
this.pdfPageDimensions = pdfPage.getClientSize();
|
|
36210
36901
|
/* eslint-disable-next-line */
|
|
36211
36902
|
return new Promise((resolve, reject) => {
|
|
36212
36903
|
this.helper.processGridExport(data, this.gantt, pdfExportProperties);
|
|
@@ -36217,6 +36908,26 @@ class PdfExport {
|
|
|
36217
36908
|
format.break = PdfLayoutBreakType.FitElement;
|
|
36218
36909
|
const layouter = this.gantt.drawGrid(pdfPage, 0, 0, format);
|
|
36219
36910
|
this.gantt.drawChart(layouter);
|
|
36911
|
+
if (this.helper.exportProps && this.helper.exportProps.fitToWidthSettings && this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
36912
|
+
this.parent.zoomingProjectStartDate = this.helper.beforeSinglePageExport['zoomingProjectStartDate'];
|
|
36913
|
+
this.parent.zoomingProjectEndDate = this.helper.beforeSinglePageExport['zoomingProjectEndDate'];
|
|
36914
|
+
this.parent.cloneProjectStartDate = this.helper.beforeSinglePageExport['cloneProjectStartDate'];
|
|
36915
|
+
this.parent.cloneProjectEndDate = this.helper.beforeSinglePageExport['cloneProjectEndDate'];
|
|
36916
|
+
this.parent.timelineModule.customTimelineSettings = this.helper.beforeSinglePageExport['customTimelineSettings'];
|
|
36917
|
+
this.parent.isTimelineRoundOff = this.helper.beforeSinglePageExport['isTimelineRoundOff'];
|
|
36918
|
+
this.parent.timelineModule.topTier = this.helper.beforeSinglePageExport['topTier'];
|
|
36919
|
+
this.parent.timelineModule.topTierCellWidth = this.helper.beforeSinglePageExport['topTierCellWidth'];
|
|
36920
|
+
this.parent.timelineModule.topTierCollection = this.helper.beforeSinglePageExport['topTierCollection'];
|
|
36921
|
+
this.parent.timelineModule.bottomTier = this.helper.beforeSinglePageExport['bottomTier'];
|
|
36922
|
+
this.parent.timelineModule.bottomTierCellWidth = this.helper.beforeSinglePageExport['bottomTierCellWidth'];
|
|
36923
|
+
this.parent.timelineModule.bottomTierCollection = this.helper.beforeSinglePageExport['bottomTierCollection'];
|
|
36924
|
+
this.parent.timelineModule.totalTimelineWidth = this.helper.beforeSinglePageExport['totalTimelineWidth'];
|
|
36925
|
+
this.parent.timelineModule.timelineStartDate = this.helper.beforeSinglePageExport['timelineStartDate'];
|
|
36926
|
+
this.parent.timelineModule.timelineEndDate = this.helper.beforeSinglePageExport['timelineEndDate'];
|
|
36927
|
+
this.parent.timelineModule.timelineRoundOffEndDate = this.helper.beforeSinglePageExport['timelineRoundOffEndDate'];
|
|
36928
|
+
this.parent.perDayWidth = this.helper.beforeSinglePageExport['perDayWidth'];
|
|
36929
|
+
this.parent.updatedConnectorLineCollection = this.helper.beforeSinglePageExport['updatedConnectorLineCollection'];
|
|
36930
|
+
}
|
|
36220
36931
|
if (!isMultipleExport) {
|
|
36221
36932
|
if (!this.isBlob) {
|
|
36222
36933
|
// save the PDF
|