@syncfusion/ej2-gantt 22.2.12 → 23.1.38
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 +197 -164
- package/dist/ej2-gantt.min.js +3 -3
- package/dist/ej2-gantt.umd.min.js +3 -3
- package/dist/ej2-gantt.umd.min.js.map +1 -1
- package/dist/es6/ej2-gantt.es2015.js +973 -280
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +1011 -302
- package/dist/es6/ej2-gantt.es5.js.map +1 -1
- package/dist/global/ej2-gantt.min.js +3 -3
- package/dist/global/ej2-gantt.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +21 -21
- package/src/gantt/actions/cell-edit.js +4 -1
- package/src/gantt/actions/connector-line-edit.js +48 -6
- package/src/gantt/actions/critical-path.d.ts +2 -0
- package/src/gantt/actions/critical-path.js +79 -61
- package/src/gantt/actions/dependency.d.ts +1 -0
- package/src/gantt/actions/dependency.js +92 -31
- package/src/gantt/actions/dialog-edit.js +28 -8
- package/src/gantt/actions/edit.js +18 -8
- 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 +58 -38
- package/src/gantt/actions/toolbar.js +8 -0
- package/src/gantt/base/date-processor.js +1 -1
- package/src/gantt/base/gantt-chart.d.ts +1 -0
- package/src/gantt/base/gantt-chart.js +85 -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 +78 -16
- package/src/gantt/base/interface.d.ts +14 -0
- package/src/gantt/base/splitter.js +1 -0
- package/src/gantt/base/task-processor.d.ts +4 -4
- package/src/gantt/base/task-processor.js +75 -25
- 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 +150 -3
- 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 +3 -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 -3
- 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 +44 -34
- package/src/gantt/renderer/connector-line.js +52 -11
- package/src/gantt/renderer/edit-tooltip.js +2 -1
- package/src/gantt/renderer/timeline.js +16 -9
- package/src/gantt/renderer/tooltip.js +5 -5
- 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
|
@@ -924,7 +924,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
924
924
|
if (!isNullOrUndefined(tasks.endDate) && tasks.endDate !== colName) {
|
|
925
925
|
this.updateScheduleFields(dialog, ganttProp, 'endDate');
|
|
926
926
|
}
|
|
927
|
-
if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName) {
|
|
927
|
+
if (!isNullOrUndefined(tasks.duration) && tasks.duration !== colName || ganttProp.duration >= 0) {
|
|
928
928
|
this.updateScheduleFields(dialog, ganttProp, 'duration');
|
|
929
929
|
}
|
|
930
930
|
if (!isNullOrUndefined(tasks.work) && tasks.work !== colName) {
|
|
@@ -1082,17 +1082,33 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1082
1082
|
var ganttProp = currentData.ganttProperties;
|
|
1083
1083
|
var taskSettings = ganttObj.taskFields;
|
|
1084
1084
|
if (taskSettings.duration === columnName) {
|
|
1085
|
-
if (!isNullOrUndefined(value) && value !== '') {
|
|
1085
|
+
if (!isNullOrUndefined(value) && value !== '' && parseInt(value) >= 0) {
|
|
1086
1086
|
ganttObj.dataOperation.updateDurationValue(value, ganttProp);
|
|
1087
1087
|
this.parent.setRecordValue(taskSettings.duration, value, currentData);
|
|
1088
1088
|
this.parent.setRecordValue('taskData.' + taskSettings.duration, ganttProp.duration, currentData);
|
|
1089
|
+
this.validateDuration(currentData);
|
|
1089
1090
|
}
|
|
1090
1091
|
else {
|
|
1091
1092
|
if (ganttObj.allowUnscheduledTasks) {
|
|
1092
|
-
|
|
1093
|
+
if ((ganttProp.startDate && ganttProp.endDate && ganttProp.startDate.getTime() > ganttProp.endDate.getTime()) || value.indexOf('-') !== -1) {
|
|
1094
|
+
this.parent.setRecordValue('duration', 0, ganttProp, true);
|
|
1095
|
+
if (ganttProp.endDate) {
|
|
1096
|
+
this.parent.setRecordValue('startDate', ganttProp.endDate, ganttProp, true);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
else {
|
|
1100
|
+
if (value === "") {
|
|
1101
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
1102
|
+
if (ganttProp.endDate) {
|
|
1103
|
+
this.parent.setRecordValue('endDate', null, ganttProp, true);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
else {
|
|
1107
|
+
this.parent.setRecordValue('duration', ganttProp.duration, ganttProp, true);
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1093
1110
|
}
|
|
1094
1111
|
}
|
|
1095
|
-
this.validateDuration(currentData);
|
|
1096
1112
|
this.parent.editModule.updateResourceRelatedFields(currentData, 'duration');
|
|
1097
1113
|
}
|
|
1098
1114
|
if (taskSettings.startDate === columnName) {
|
|
@@ -1100,13 +1116,15 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1100
1116
|
var startDate = this.parent.dateValidationModule.getDateFromFormat(value);
|
|
1101
1117
|
startDate = this.parent.dateValidationModule.checkStartDate(startDate, ganttProp);
|
|
1102
1118
|
this.parent.setRecordValue('startDate', startDate, ganttProp, true);
|
|
1119
|
+
this.validateStartDate(currentData);
|
|
1103
1120
|
}
|
|
1104
1121
|
else {
|
|
1105
1122
|
if (ganttObj.allowUnscheduledTasks && !(currentData.hasChildRecords)) {
|
|
1106
1123
|
this.parent.setRecordValue('startDate', null, ganttProp, true);
|
|
1124
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
1125
|
+
this.parent.setRecordValue('isMilestone', false, ganttProp, true);
|
|
1107
1126
|
}
|
|
1108
1127
|
}
|
|
1109
|
-
this.validateStartDate(currentData);
|
|
1110
1128
|
}
|
|
1111
1129
|
if (taskSettings.endDate === columnName) {
|
|
1112
1130
|
if (value !== '') {
|
|
@@ -1121,13 +1139,15 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1121
1139
|
if (isNullOrUndefined(ganttProp.startDate) || endDate.getTime() > (ganttProp.startDate).getTime()) {
|
|
1122
1140
|
this.parent.setRecordValue('endDate', endDate, ganttProp, true);
|
|
1123
1141
|
}
|
|
1142
|
+
this.validateEndDate(currentData);
|
|
1124
1143
|
}
|
|
1125
1144
|
else {
|
|
1126
1145
|
if (ganttObj.allowUnscheduledTasks) {
|
|
1127
1146
|
this.parent.setRecordValue('endDate', null, ganttProp, true);
|
|
1147
|
+
this.parent.setRecordValue('duration', null, ganttProp, true);
|
|
1148
|
+
this.parent.setRecordValue('isMilestone', false, ganttProp, true);
|
|
1128
1149
|
}
|
|
1129
1150
|
}
|
|
1130
|
-
this.validateEndDate(currentData);
|
|
1131
1151
|
}
|
|
1132
1152
|
if (taskSettings.work === columnName) {
|
|
1133
1153
|
if (!isNullOrUndefined(value) && value !== '') {
|
|
@@ -1534,7 +1554,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
1534
1554
|
var eDate = getValue('endDate', selectedItem);
|
|
1535
1555
|
var duration = getValue('duration', selectedItem);
|
|
1536
1556
|
var startDate_1 = !isNullOrUndefined(gridData) && gridData.length > 0 ?
|
|
1537
|
-
!isNullOrUndefined(taskFields.endDate) ? new Date(getValue('endDate', gridData[0]).getTime()) :
|
|
1557
|
+
(!isNullOrUndefined(taskFields.endDate) && !isNullOrUndefined(gridData[0].endDate)) ? new Date(getValue('endDate', gridData[0]).getTime()) :
|
|
1538
1558
|
new Date(getValue('startDate', gridData[0]).getTime()) :
|
|
1539
1559
|
!isNullOrUndefined(this.beforeOpenArgs.rowData.ganttProperties.startDate) &&
|
|
1540
1560
|
new Date(this.beforeOpenArgs.rowData.ganttProperties.startDate.getTime());
|
|
@@ -2215,7 +2235,7 @@ var DialogEdit = /** @class */ (function () {
|
|
|
2215
2235
|
tasksData[fieldName] = column.edit.read(inputElement, controlObj.value);
|
|
2216
2236
|
}
|
|
2217
2237
|
}
|
|
2218
|
-
else if (
|
|
2238
|
+
else if (column.editType === 'booleanedit') {
|
|
2219
2239
|
if (inputElement instanceof HTMLInputElement && inputElement.checked === true) {
|
|
2220
2240
|
tasksData[fieldName] = true;
|
|
2221
2241
|
}
|
|
@@ -883,10 +883,11 @@ var Edit = /** @class */ (function () {
|
|
|
883
883
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
884
884
|
}
|
|
885
885
|
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
886
|
-
(args.action === "DrawConnectorLine")
|
|
886
|
+
(args.action === "DrawConnectorLine")) {
|
|
887
887
|
this.updateChildItems(ganttRecord);
|
|
888
888
|
}
|
|
889
889
|
this.updateParentItemOnEditing();
|
|
890
|
+
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
890
891
|
}
|
|
891
892
|
/** Update parent up-to zeroth level */
|
|
892
893
|
if (ganttRecord.parentItem) {
|
|
@@ -899,6 +900,10 @@ var Edit = /** @class */ (function () {
|
|
|
899
900
|
this.updateParentItemOnEditing();
|
|
900
901
|
}
|
|
901
902
|
}
|
|
903
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit && this.parent.connectorLineEditModule && args.data) {
|
|
904
|
+
this.parent.connectorLineEditModule['calculateOffset'](args.data);
|
|
905
|
+
}
|
|
906
|
+
this.parent.predecessorModule['validatedParentIds'] = [];
|
|
902
907
|
this.initiateSaveAction(args);
|
|
903
908
|
};
|
|
904
909
|
Edit.prototype.updateParentItemOnEditing = function () {
|
|
@@ -918,7 +923,7 @@ var Edit = /** @class */ (function () {
|
|
|
918
923
|
*/
|
|
919
924
|
Edit.prototype.updateParentChildRecord = function (data) {
|
|
920
925
|
var ganttRecord = data;
|
|
921
|
-
if (ganttRecord.hasChildRecords && this.taskbarMoved && this.parent.taskMode === 'Auto' && (!isNullOrUndefined(this.parent.editModule.cellEditModule) && !this.parent.editModule.cellEditModule.isResourceCellEdited)) {
|
|
926
|
+
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)) {
|
|
922
927
|
this.updateChildItems(ganttRecord);
|
|
923
928
|
}
|
|
924
929
|
if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
|
|
@@ -1394,6 +1399,11 @@ var Edit = /** @class */ (function () {
|
|
|
1394
1399
|
this.updateScheduleDatesOnEditing(args);
|
|
1395
1400
|
}
|
|
1396
1401
|
}
|
|
1402
|
+
if (this.parent.enableCriticalPath) {
|
|
1403
|
+
var criticalModule = this.parent.criticalPathModule;
|
|
1404
|
+
criticalModule.showCriticalPath(true);
|
|
1405
|
+
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
1406
|
+
}
|
|
1397
1407
|
if (!this.parent.editSettings.allowTaskbarEditing || (this.parent.editSettings.allowTaskbarEditing &&
|
|
1398
1408
|
!this.taskbarEditModule.dependencyCancel)) {
|
|
1399
1409
|
eventArgs.requestType = 'save';
|
|
@@ -1407,11 +1417,6 @@ var Edit = /** @class */ (function () {
|
|
|
1407
1417
|
eventArgs.taskBarEditAction = args.taskBarEditAction;
|
|
1408
1418
|
}
|
|
1409
1419
|
this.endEditAction(args);
|
|
1410
|
-
if (this.parent.enableCriticalPath) {
|
|
1411
|
-
var criticalModule = this.parent.criticalPathModule;
|
|
1412
|
-
criticalModule.showCriticalPath(true);
|
|
1413
|
-
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
1414
|
-
}
|
|
1415
1420
|
this.parent.trigger('actionComplete', eventArgs);
|
|
1416
1421
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
1417
1422
|
this.parent.hideMaskRow();
|
|
@@ -1597,7 +1602,9 @@ var Edit = /** @class */ (function () {
|
|
|
1597
1602
|
if (!this.parent.taskFields.parentID) {
|
|
1598
1603
|
var deleteRecordIDs = [];
|
|
1599
1604
|
deleteRecordIDs.push(deletedRow.ganttProperties.rowUniqueID.toString());
|
|
1600
|
-
this.parent.
|
|
1605
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
1606
|
+
this.parent.editModule.removeFromDataSource(deleteRecordIDs);
|
|
1607
|
+
}
|
|
1601
1608
|
}
|
|
1602
1609
|
var flatRecordIndex = this.parent.flatData.indexOf(deletedRow);
|
|
1603
1610
|
if (gObj.taskFields.parentID) {
|
|
@@ -2980,6 +2987,9 @@ var Edit = /** @class */ (function () {
|
|
|
2980
2987
|
_this.parent.flatData[_this.parent.getTaskIds().indexOf('T' + args.data[tasks.id])] : _this.parent.getRecordByID(args.data[tasks.id]);
|
|
2981
2988
|
if (!isNullOrUndefined(ganttData)) {
|
|
2982
2989
|
_this.validateUpdateValues(args.newTaskData, ganttData, true);
|
|
2990
|
+
_this.parent.dateValidationModule.calculateEndDate(ganttData);
|
|
2991
|
+
_this.parent.dataOperation.updateWidthLeft(ganttData);
|
|
2992
|
+
_this.parent.dataOperation.updateParentItems(ganttData);
|
|
2983
2993
|
}
|
|
2984
2994
|
if (!isNullOrUndefined(args.data["" + tempTaskID])) {
|
|
2985
2995
|
if (args.data[tempTaskID] != args.data['ganttProperties']['taskId']) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { PdfExportProperties } from './../base/interface';
|
|
2
2
|
import { Gantt } from '../base/gantt';
|
|
3
|
+
import { ExportHelper } from '../export/export-helper';
|
|
4
|
+
import { SizeF } from '@syncfusion/ej2-pdf-export';
|
|
3
5
|
import { PdfGantt } from '../export/pdf-gantt';
|
|
4
6
|
/**
|
|
5
7
|
*
|
|
@@ -7,12 +9,13 @@ import { PdfGantt } from '../export/pdf-gantt';
|
|
|
7
9
|
*/
|
|
8
10
|
export declare class PdfExport {
|
|
9
11
|
private parent;
|
|
10
|
-
|
|
12
|
+
helper: ExportHelper;
|
|
11
13
|
private pdfDocument;
|
|
12
14
|
gantt: PdfGantt;
|
|
13
15
|
isPdfExport: boolean;
|
|
14
16
|
private isBlob;
|
|
15
17
|
private blobPromise;
|
|
18
|
+
pdfPageDimensions: SizeF;
|
|
16
19
|
/**
|
|
17
20
|
* @param {Gantt} parent .
|
|
18
21
|
* @hidden
|
|
@@ -77,11 +77,23 @@ var PdfExport = /** @class */ (function () {
|
|
|
77
77
|
if (isNullOrUndefined(pdfExportProperties)) {
|
|
78
78
|
pdfExportProperties = {};
|
|
79
79
|
}
|
|
80
|
-
if (pdfExportProperties.
|
|
81
|
-
|
|
80
|
+
if (pdfExportProperties.fitToWidthSettings && pdfExportProperties.fitToWidthSettings.isFitToWidth) {
|
|
81
|
+
if (pdfExportProperties.exportType === 'CurrentViewData') {
|
|
82
|
+
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.currentViewData, null, true);
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
this.helper.beforeSinglePageExport['cloneFlatData'] = extend([], this.parent.flatData, null, true);
|
|
86
|
+
}
|
|
87
|
+
this.helper.beforeSinglePageExport['cloneCurrentViewData'] = extend([], this.parent.currentViewData, null, true);
|
|
88
|
+
data = this.helper.beforeSinglePageExport['cloneFlatData'];
|
|
82
89
|
}
|
|
83
90
|
else {
|
|
84
|
-
|
|
91
|
+
if (pdfExportProperties.exportType === 'CurrentViewData') {
|
|
92
|
+
data = this.parent.currentViewData;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
data = this.parent.flatData;
|
|
96
|
+
}
|
|
85
97
|
}
|
|
86
98
|
this.initGantt();
|
|
87
99
|
if (!isNullOrUndefined(pdfDoc)) {
|
|
@@ -106,6 +118,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
106
118
|
var section = this.pdfDocument.sections.add();
|
|
107
119
|
this.processSectionExportProperties(section, pdfExportProperties);
|
|
108
120
|
var pdfPage = section.pages.add();
|
|
121
|
+
this.pdfPageDimensions = pdfPage.getClientSize();
|
|
109
122
|
/* eslint-disable-next-line */
|
|
110
123
|
return new Promise(function (resolve, reject) {
|
|
111
124
|
_this.helper.processGridExport(data, _this.gantt, pdfExportProperties);
|
|
@@ -116,6 +129,26 @@ var PdfExport = /** @class */ (function () {
|
|
|
116
129
|
format.break = PdfLayoutBreakType.FitElement;
|
|
117
130
|
var layouter = _this.gantt.drawGrid(pdfPage, 0, 0, format);
|
|
118
131
|
_this.gantt.drawChart(layouter);
|
|
132
|
+
if (_this.helper.exportProps && _this.helper.exportProps.fitToWidthSettings && _this.helper.exportProps.fitToWidthSettings.isFitToWidth) {
|
|
133
|
+
_this.parent.zoomingProjectStartDate = _this.helper.beforeSinglePageExport['zoomingProjectStartDate'];
|
|
134
|
+
_this.parent.zoomingProjectEndDate = _this.helper.beforeSinglePageExport['zoomingProjectEndDate'];
|
|
135
|
+
_this.parent.cloneProjectStartDate = _this.helper.beforeSinglePageExport['cloneProjectStartDate'];
|
|
136
|
+
_this.parent.cloneProjectEndDate = _this.helper.beforeSinglePageExport['cloneProjectEndDate'];
|
|
137
|
+
_this.parent.timelineModule.customTimelineSettings = _this.helper.beforeSinglePageExport['customTimelineSettings'];
|
|
138
|
+
_this.parent.isTimelineRoundOff = _this.helper.beforeSinglePageExport['isTimelineRoundOff'];
|
|
139
|
+
_this.parent.timelineModule.topTier = _this.helper.beforeSinglePageExport['topTier'];
|
|
140
|
+
_this.parent.timelineModule.topTierCellWidth = _this.helper.beforeSinglePageExport['topTierCellWidth'];
|
|
141
|
+
_this.parent.timelineModule.topTierCollection = _this.helper.beforeSinglePageExport['topTierCollection'];
|
|
142
|
+
_this.parent.timelineModule.bottomTier = _this.helper.beforeSinglePageExport['bottomTier'];
|
|
143
|
+
_this.parent.timelineModule.bottomTierCellWidth = _this.helper.beforeSinglePageExport['bottomTierCellWidth'];
|
|
144
|
+
_this.parent.timelineModule.bottomTierCollection = _this.helper.beforeSinglePageExport['bottomTierCollection'];
|
|
145
|
+
_this.parent.timelineModule.totalTimelineWidth = _this.helper.beforeSinglePageExport['totalTimelineWidth'];
|
|
146
|
+
_this.parent.timelineModule.timelineStartDate = _this.helper.beforeSinglePageExport['timelineStartDate'];
|
|
147
|
+
_this.parent.timelineModule.timelineEndDate = _this.helper.beforeSinglePageExport['timelineEndDate'];
|
|
148
|
+
_this.parent.timelineModule.timelineRoundOffEndDate = _this.helper.beforeSinglePageExport['timelineRoundOffEndDate'];
|
|
149
|
+
_this.parent.perDayWidth = _this.helper.beforeSinglePageExport['perDayWidth'];
|
|
150
|
+
_this.parent.updatedConnectorLineCollection = _this.helper.beforeSinglePageExport['updatedConnectorLineCollection'];
|
|
151
|
+
}
|
|
119
152
|
if (!isMultipleExport) {
|
|
120
153
|
if (!_this.isBlob) {
|
|
121
154
|
// save the PDF
|
|
@@ -111,8 +111,16 @@ var RowDD = /** @class */ (function () {
|
|
|
111
111
|
var dragElement = this.parent.element.querySelector('.e-ganttdrag');
|
|
112
112
|
var ganttTop = this.parent.element.getClientRects()[0].top;
|
|
113
113
|
var ganttLeft = this.parent.element.getClientRects()[0].left;
|
|
114
|
-
var left
|
|
115
|
-
var top
|
|
114
|
+
var left;
|
|
115
|
+
var top;
|
|
116
|
+
if (this.parent.isAdaptive) {
|
|
117
|
+
left = args.originalEvent.event.touches[0].clientX - ganttLeft;
|
|
118
|
+
top = args.originalEvent.event.touches[0].clientY - ganttTop;
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
left = getValue('event', args.originalEvent).clientX - ganttLeft;
|
|
122
|
+
top = getValue('event', args.originalEvent).clientY - ganttTop;
|
|
123
|
+
}
|
|
116
124
|
dragElement.style.left = left + 20 + 'px';
|
|
117
125
|
dragElement.style.top = top + 20 + 'px';
|
|
118
126
|
this.parent.trigger('rowDrag', args);
|
|
@@ -261,7 +261,24 @@ var Selection = /** @class */ (function () {
|
|
|
261
261
|
* @returns {Object[]} .
|
|
262
262
|
*/
|
|
263
263
|
Selection.prototype.getSelectedRecords = function () {
|
|
264
|
-
|
|
264
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
265
|
+
var selectedRows = [];
|
|
266
|
+
var selectedIndexes_1 = this.parent.selectionModule.getSelectedRowIndexes();
|
|
267
|
+
var _loop_1 = function (i) {
|
|
268
|
+
var rec = this_1.parent.currentViewData.filter(function (data) {
|
|
269
|
+
return data.index == selectedIndexes_1[i];
|
|
270
|
+
})[0];
|
|
271
|
+
selectedRows.push(rec);
|
|
272
|
+
};
|
|
273
|
+
var this_1 = this;
|
|
274
|
+
for (var i = 0; i < selectedIndexes_1.length; i++) {
|
|
275
|
+
_loop_1(i);
|
|
276
|
+
}
|
|
277
|
+
return selectedRows;
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
return this.parent.treeGrid.getSelectedRecords();
|
|
281
|
+
}
|
|
265
282
|
};
|
|
266
283
|
/**
|
|
267
284
|
* Get the selected records for cell selection.
|
|
@@ -361,19 +378,19 @@ var Selection = /** @class */ (function () {
|
|
|
361
378
|
records = [records];
|
|
362
379
|
}
|
|
363
380
|
var ganttRow = [].slice.call(this.parent.ganttChartModule.chartBodyContent.querySelector('tbody').children);
|
|
364
|
-
var
|
|
381
|
+
var _loop_2 = function (i) {
|
|
365
382
|
var selectedRow = ganttRow.filter(function (e) {
|
|
366
383
|
// eslint-disable-next-line
|
|
367
384
|
return parseInt(e.getAttribute('aria-rowindex'), 0) === records[i];
|
|
368
385
|
})[0];
|
|
369
386
|
if (!isNullOrUndefined(selectedRow)) {
|
|
370
387
|
// eslint-disable-next-line
|
|
371
|
-
|
|
388
|
+
this_2.getSelectedRowIndexes().indexOf(records[i]) > -1 ? this_2.addClass(selectedRow) : this_2.removeClass(selectedRow);
|
|
372
389
|
}
|
|
373
390
|
};
|
|
374
|
-
var
|
|
391
|
+
var this_2 = this;
|
|
375
392
|
for (var i = 0; i < records.length; i++) {
|
|
376
|
-
|
|
393
|
+
_loop_2(i);
|
|
377
394
|
}
|
|
378
395
|
};
|
|
379
396
|
Selection.prototype.addClass = function (selectedRow) {
|
|
@@ -88,13 +88,10 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
88
88
|
TaskbarEdit.prototype.mouseDownHandler = function (e) {
|
|
89
89
|
if (this.parent.editSettings.allowTaskbarEditing && !this.parent.readOnly) {
|
|
90
90
|
this.canDrag = false;
|
|
91
|
-
if (this.
|
|
91
|
+
if (this.taskBarEditElement) {
|
|
92
92
|
var targetElement = this.getElementByPosition(e);
|
|
93
93
|
var element = parentsUntil(targetElement, cls.taskBarMainContainer);
|
|
94
|
-
if (element && element.innerHTML === this.taskBarEditElement.innerHTML
|
|
95
|
-
!(targetElement.classList.contains(cls.connectorPointLeft) ||
|
|
96
|
-
targetElement.classList.contains(cls.connectorPointRight)) &&
|
|
97
|
-
!this.tapPointOnFocus) {
|
|
94
|
+
if ((element && element.innerHTML === this.taskBarEditElement.innerHTML || this.taskBarEditElement.classList.contains("e-segmented-taskbar") || this.taskBarEditElement.classList.contains("collpse-parent-border"))) {
|
|
98
95
|
this.updateTaskBarEditElement(e);
|
|
99
96
|
this.canDrag = true;
|
|
100
97
|
e.preventDefault();
|
|
@@ -117,7 +114,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
117
114
|
}
|
|
118
115
|
return;
|
|
119
116
|
}
|
|
120
|
-
if (this.tapPointOnFocus && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
|
|
117
|
+
if (this.tapPointOnFocus && !isNullOrUndefined(this.taskBarEditElement) && element && element.innerHTML !== this.taskBarEditElement.innerHTML) {
|
|
121
118
|
this.connectorSecondRecord = this.parent.ganttChartModule.getRecordByTaskBar(element);
|
|
122
119
|
this.connectorSecondAction = 'ConnectorPointLeftDrag';
|
|
123
120
|
this.connectorSecondElement = element;
|
|
@@ -128,8 +125,16 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
128
125
|
this.showHideActivePredecessors(false);
|
|
129
126
|
this.initPublicProp();
|
|
130
127
|
}
|
|
131
|
-
else if (targetElement.classList.contains(cls.connectorPointLeftHover)
|
|
132
|
-
|
|
128
|
+
else if (targetElement.classList.contains(cls.connectorPointLeftHover)) {
|
|
129
|
+
this.canDrag = false;
|
|
130
|
+
this.multipleSelectionEnabled();
|
|
131
|
+
this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
|
|
132
|
+
this.tapPointOnFocus = true;
|
|
133
|
+
this.taskBarEditAction = 'ConnectorPointLeftDrag';
|
|
134
|
+
this.connectorSecondRecord = this.taskBarEditRecord;
|
|
135
|
+
this.taskBarEditingAction(e, false);
|
|
136
|
+
}
|
|
137
|
+
else if (targetElement.classList.contains(cls.connectorPointRightHover)) {
|
|
133
138
|
this.canDrag = false;
|
|
134
139
|
this.multipleSelectionEnabled();
|
|
135
140
|
this.showHideTaskBarEditingElements(targetElement, this.taskBarEditElement);
|
|
@@ -229,7 +234,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
229
234
|
};
|
|
230
235
|
// eslint-disable-next-line
|
|
231
236
|
TaskbarEdit.prototype.mouseLeaveHandler = function (e) {
|
|
232
|
-
this.
|
|
237
|
+
if (this.taskBarEditAction === "ChildDrag" || this.taskBarEditAction === "ParentDrag" || this.taskBarEditAction === "ProgressResizing" || this.taskBarEditAction === "LeftResizing" || this.taskBarEditAction === "RightResizing") {
|
|
238
|
+
this.dragMouseLeave = false;
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
this.dragMouseLeave = true;
|
|
242
|
+
}
|
|
233
243
|
};
|
|
234
244
|
/**
|
|
235
245
|
* To update taskbar edited elements on mouse down action.
|
|
@@ -259,7 +269,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
259
269
|
}
|
|
260
270
|
}
|
|
261
271
|
if (this.parent.editSettings.allowTaskbarEditing && element) {
|
|
262
|
-
this.showHideTaskBarEditingElements(element, this.
|
|
272
|
+
this.showHideTaskBarEditingElements(element, this.editElement);
|
|
263
273
|
this.editElement = element;
|
|
264
274
|
this.realTaskbarElement = this.editElement;
|
|
265
275
|
var index = this.editElement.getAttribute('data-segment-index');
|
|
@@ -340,7 +350,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
340
350
|
else {
|
|
341
351
|
if (this.parent.isAdaptive) {
|
|
342
352
|
if (this.taskBarEditElement) {
|
|
343
|
-
this.showHideTaskBarEditingElements(element, this.
|
|
353
|
+
this.showHideTaskBarEditingElements(element, this.editElement);
|
|
344
354
|
}
|
|
345
355
|
this.initPublicProp();
|
|
346
356
|
}
|
|
@@ -400,8 +410,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
400
410
|
&& isShowConnectorPoints) {
|
|
401
411
|
var connectorElement = !isNullOrUndefined(element.querySelector('.' + cls.connectorPointLeft)) ?
|
|
402
412
|
element : element.parentElement;
|
|
403
|
-
|
|
404
|
-
|
|
413
|
+
if (!isNullOrUndefined(connectorElement.querySelector('.' + cls.connectorPointLeft))) {
|
|
414
|
+
addClass([connectorElement.querySelector('.' + cls.connectorPointLeft)], [cls.connectorPointLeftHover]);
|
|
415
|
+
}
|
|
416
|
+
if (!isNullOrUndefined(connectorElement.querySelector('.' + cls.connectorPointRight))) {
|
|
417
|
+
addClass([connectorElement.querySelector('.' + cls.connectorPointRight)], [cls.connectorPointRightHover]);
|
|
418
|
+
}
|
|
405
419
|
}
|
|
406
420
|
}
|
|
407
421
|
else if (!fadeConnectorLine) {
|
|
@@ -528,7 +542,8 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
528
542
|
var item = this.taskBarEditRecord.ganttProperties;
|
|
529
543
|
this.previousItem = this.parent.timelineModule.extendFunction(item, this.previousItemProperty);
|
|
530
544
|
if (this.taskBarEditAction !== 'ConnectorPointLeftDrag' &&
|
|
531
|
-
this.taskBarEditAction !== 'ConnectorPointRightDrag'
|
|
545
|
+
this.taskBarEditAction !== 'ConnectorPointRightDrag' &&
|
|
546
|
+
!(this.parent.viewType == 'ResourceView' && this.taskBarEditAction == 'ParentDrag')) {
|
|
532
547
|
this.editTooltip.showHideTaskbarEditTooltip(true, this.segmentIndex);
|
|
533
548
|
}
|
|
534
549
|
this.taskBarEditElement.setAttribute('aria-grabbed', 'true');
|
|
@@ -566,6 +581,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
566
581
|
this.dragMouseLeave = false;
|
|
567
582
|
this.isMouseDragCheck();
|
|
568
583
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
584
|
+
event.preventDefault();
|
|
569
585
|
if (!isNullOrUndefined(this.taskbarElement) && !isNullOrUndefined(this.editElement) && (this.taskBarEditAction !== "ConnectorPointRightDrag" && this.taskBarEditAction !== "ConnectorPointLeftDrag") && !(this.parent.viewType === 'ResourceView' && this.currentData.hasChildRecords)) {
|
|
570
586
|
var currentElement = this.editElement.parentElement;
|
|
571
587
|
currentElement.style.setProperty("position", "absolute");
|
|
@@ -655,9 +671,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
655
671
|
this.taskBarEditAction === 'ConnectorPointRightDrag') {
|
|
656
672
|
this.updateConnectorLineSecondProperties(e);
|
|
657
673
|
this.triggerDependencyEvent(e);
|
|
658
|
-
|
|
659
|
-
this.drawFalseLine();
|
|
660
|
-
}
|
|
674
|
+
this.drawFalseLine();
|
|
661
675
|
}
|
|
662
676
|
if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
|
|
663
677
|
if (this.dragMoveY > this.mouseMoveY) {
|
|
@@ -669,7 +683,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
669
683
|
this.currentItemTop = this.currentItemTop + this.mouseMoveY;
|
|
670
684
|
}
|
|
671
685
|
var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
|
|
672
|
-
this.
|
|
686
|
+
if (this.parent.isAdaptive || e.touches) {
|
|
687
|
+
this.dragMoveY = e.touches[0].pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
688
|
+
}
|
|
689
|
+
else {
|
|
690
|
+
this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
691
|
+
}
|
|
673
692
|
this.topValue = this.currentItemTop;
|
|
674
693
|
this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
|
|
675
694
|
this.topValue == this.currentItemTop) ? this.topValue :
|
|
@@ -1056,6 +1075,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1056
1075
|
if (this.segmentIndex === 0) {
|
|
1057
1076
|
this.parent.setRecordValue('width', item.width - differenceWidth, item, true);
|
|
1058
1077
|
this.parent.setRecordValue('left', item.left + differenceWidth, item, true);
|
|
1078
|
+
segment.width = segment.width - differenceWidth;
|
|
1059
1079
|
for (var i = 1; i < item.segments.length; i++) {
|
|
1060
1080
|
var segment_3 = segments[i];
|
|
1061
1081
|
segment_3.left = segment_3.left - differenceWidth;
|
|
@@ -1483,7 +1503,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1483
1503
|
var milliSecondsPerPixel = (24 * 60 * 60 * 1000) / this.parent.perDayWidth;
|
|
1484
1504
|
pStartDate.setTime(pStartDate.getTime() + (left * milliSecondsPerPixel));
|
|
1485
1505
|
/* To render the milestone in proper date while editing */
|
|
1486
|
-
if (isMilestone && !isNullOrUndefined(property.
|
|
1506
|
+
if (isMilestone && !isNullOrUndefined(property.predecessorsName) && property.predecessorsName !== '') {
|
|
1487
1507
|
pStartDate.setDate(pStartDate.getDate() - 1);
|
|
1488
1508
|
this.parent.dateValidationModule.setTime(this.parent.defaultEndTime, pStartDate);
|
|
1489
1509
|
pStartDate = this.parent.dateValidationModule.checkStartDate(pStartDate, property, true);
|
|
@@ -1536,6 +1556,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1536
1556
|
var traceParentTaskBar = this.taskBarEditElement.querySelector('.' + cls.traceParentTaskBar);
|
|
1537
1557
|
var traceParentProgressBar = this.taskBarEditElement.querySelector('.' + cls.traceParentProgressBar);
|
|
1538
1558
|
var traceConnectorPointRight = this.taskBarEditElement.querySelector('.' + cls.rightConnectorPointOuterDiv);
|
|
1559
|
+
var segmentConnectorPointRight = taskBarMainContainer.querySelector('.' + cls.rightConnectorPointOuterDiv);
|
|
1539
1560
|
var manualParentTaskbar = this.taskBarEditElement;
|
|
1540
1561
|
var manualTaskbar = this.taskBarEditElement.querySelector('.' + cls.manualParentTaskBar);
|
|
1541
1562
|
var manualParentRight = this.taskBarEditElement.querySelector('.' + cls.manualParentRightResizer);
|
|
@@ -1562,6 +1583,9 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1562
1583
|
}
|
|
1563
1584
|
taskBarMainContainer.style.setProperty(position, (item.left) + 'px');
|
|
1564
1585
|
taskBarMainContainer.style.width = (width) + 'px';
|
|
1586
|
+
if (segmentedTaskBarContainer && segmentConnectorPointRight) {
|
|
1587
|
+
segmentConnectorPointRight.style.left = (this.parent.isAdaptive ? (width + 10) : (width + 2)) + 'px';
|
|
1588
|
+
}
|
|
1565
1589
|
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
|
|
1566
1590
|
(this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
|
|
1567
1591
|
taskBarMainContainer.style.setProperty('top', (this.topValue) + 'px');
|
|
@@ -1678,9 +1702,9 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1678
1702
|
}
|
|
1679
1703
|
if (segmentedTaskBarContainer) {
|
|
1680
1704
|
taskBarRightResizer.style.setProperty(position, rightResizer + 'px');
|
|
1681
|
-
traceChildProgressBar.style.width = (segment.
|
|
1705
|
+
traceChildProgressBar.style.width = (segment.width) + 'px';
|
|
1682
1706
|
if (!isNullOrUndefined(childProgressResizer)) {
|
|
1683
|
-
childProgressResizer.style.setProperty(position, segment.
|
|
1707
|
+
childProgressResizer.style.setProperty(position, segment.width - 10 + 'px');
|
|
1684
1708
|
}
|
|
1685
1709
|
}
|
|
1686
1710
|
}
|
|
@@ -1750,9 +1774,6 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1750
1774
|
this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor && (!this.connectorSecondRecord.hasChildRecords ||
|
|
1751
1775
|
this.connectorSecondRecord.hasChildRecords && this.parent.allowParentDependency)) {
|
|
1752
1776
|
this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
|
|
1753
|
-
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
1754
|
-
this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
|
|
1755
|
-
}
|
|
1756
1777
|
}
|
|
1757
1778
|
else {
|
|
1758
1779
|
if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
|
|
@@ -2042,6 +2063,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
2042
2063
|
TaskbarEdit.prototype.updateConnectorLineSecondProperties = function (e) {
|
|
2043
2064
|
var target = this.getElementByPosition(e);
|
|
2044
2065
|
var element = parentsUntil(target, cls.taskBarMainContainer);
|
|
2066
|
+
var isBigger = document.body.className.includes("e-bigger");
|
|
2045
2067
|
this.connectorSecondAction = null;
|
|
2046
2068
|
var scrollTop = 0;
|
|
2047
2069
|
if (parentsUntil(target, cls.connectorPointLeft)) {
|
|
@@ -2064,20 +2086,20 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
2064
2086
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
2065
2087
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
2066
2088
|
if (!this.parent.allowParentDependency) {
|
|
2067
|
-
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
|
|
2089
|
+
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
2068
2090
|
this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
|
|
2069
2091
|
}
|
|
2070
2092
|
else {
|
|
2071
2093
|
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
2072
|
-
this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft;
|
|
2094
|
+
this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
2073
2095
|
this.elementOffsetTop = ((this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
2074
2096
|
}
|
|
2075
2097
|
else {
|
|
2076
|
-
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
|
|
2098
|
+
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
2077
2099
|
this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
|
|
2078
2100
|
}
|
|
2079
2101
|
}
|
|
2080
|
-
this.elementOffsetWidth = this.realTaskbarElement.offsetWidth;
|
|
2102
|
+
this.elementOffsetWidth = this.realTaskbarElement.offsetWidth + ((isBigger) ? 20 : 0);
|
|
2081
2103
|
this.elementOffsetHeight = this.realTaskbarElement.offsetHeight;
|
|
2082
2104
|
}
|
|
2083
2105
|
this.showHideTaskBarEditingElements(element, this.highlightedSecondElement, true);
|
|
@@ -2185,18 +2207,16 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
2185
2207
|
// Get XY coordinates for touch and non-touch device
|
|
2186
2208
|
TaskbarEdit.prototype.getCoordinate = function (event) {
|
|
2187
2209
|
var coordinates = {};
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2210
|
+
var e = event;
|
|
2211
|
+
coordinates.pageX = e.pageX;
|
|
2212
|
+
coordinates.pageY = e.pageY;
|
|
2213
|
+
if (event && event.type !== 'click') {
|
|
2214
|
+
var e_1 = event;
|
|
2215
|
+
if (e_1.type === 'touchmove' || e_1.type === 'touchstart' || e_1.type === 'touchend') {
|
|
2216
|
+
coordinates.pageX = e_1.changedTouches[0].pageX;
|
|
2217
|
+
coordinates.pageY = e_1.changedTouches[0].pageY;
|
|
2193
2218
|
}
|
|
2194
2219
|
}
|
|
2195
|
-
else if (event) {
|
|
2196
|
-
var e = event;
|
|
2197
|
-
coordinates.pageX = e.pageX;
|
|
2198
|
-
coordinates.pageY = e.pageY;
|
|
2199
|
-
}
|
|
2200
2220
|
return coordinates;
|
|
2201
2221
|
};
|
|
2202
2222
|
// Get current target element by mouse position
|
|
@@ -394,6 +394,14 @@ var Toolbar = /** @class */ (function () {
|
|
|
394
394
|
var edit = gObj.editSettings;
|
|
395
395
|
var gID = this.id;
|
|
396
396
|
var ind = gObj.selectedRowIndex;
|
|
397
|
+
if (!this.parent.loadChildOnDemand && this.parent.taskFields.hasChildMapping) {
|
|
398
|
+
for (var i = 0; i < gObj.updatedRecords.length; i++) {
|
|
399
|
+
if (gObj.updatedRecords[i].index === ind) {
|
|
400
|
+
ind = i;
|
|
401
|
+
break;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
397
405
|
var previousGanttRecord;
|
|
398
406
|
var isSelected = gObj.selectionModule ? gObj.selectionModule.selectedRowIndexes.length === 1 ||
|
|
399
407
|
gObj.selectionModule.getSelectedRowCellIndexes().length === 1 ? true : false : false;
|
|
@@ -307,7 +307,7 @@ var DateProcessor = /** @class */ (function () {
|
|
|
307
307
|
}
|
|
308
308
|
else {
|
|
309
309
|
if ((!isNullOrUndefined(this.parent.taskFields.milestone)) && (!isNullOrUndefined(ganttProperties.startDate)) && !isNullOrUndefined(ganttProperties.endDate) &&
|
|
310
|
-
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() &&
|
|
310
|
+
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && (ganttData.taskData[this.parent.taskFields.milestone] === false)) {
|
|
311
311
|
tDuration = 1;
|
|
312
312
|
}
|
|
313
313
|
else {
|