@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isNullOrUndefined, isUndefined, extend, setValue, getValue, deleteObject, createElement } from '@syncfusion/ej2-base';
|
|
2
|
-
import { DataManager, Query, ODataAdaptor, WebApiAdaptor
|
|
2
|
+
import { DataManager, Query, ODataAdaptor, WebApiAdaptor } from '@syncfusion/ej2-data';
|
|
3
3
|
import { getUid } from '@syncfusion/ej2-grids';
|
|
4
4
|
import { getSwapKey, isScheduledTask, getTaskData, isRemoteData, getIndex, isCountRequired, updateDates } from '../base/utils';
|
|
5
5
|
import { CellEdit } from './cell-edit';
|
|
@@ -402,6 +402,11 @@ var Edit = /** @class */ (function () {
|
|
|
402
402
|
var ganttPropByMapping = getSwapKey(ganttObj.columnMapping);
|
|
403
403
|
var scheduleFieldNames = [];
|
|
404
404
|
var isScheduleValueUpdated = false;
|
|
405
|
+
if (!isNullOrUndefined(ganttData[tasks.milestone])) {
|
|
406
|
+
if (ganttData[tasks.milestone] === true) {
|
|
407
|
+
ganttData[tasks.milestone] = false;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
405
410
|
for (var _i = 0, _b = Object.keys(data); _i < _b.length; _i++) {
|
|
406
411
|
var key = _b[_i];
|
|
407
412
|
if ([tasks.startDate, tasks.endDate, tasks.duration].indexOf(key) !== -1) {
|
|
@@ -463,6 +468,22 @@ var Edit = /** @class */ (function () {
|
|
|
463
468
|
else if (key === tasks.cssClass) {
|
|
464
469
|
ganttPropKey = 'cssClass';
|
|
465
470
|
}
|
|
471
|
+
else if (key === tasks.milestone) {
|
|
472
|
+
ganttPropKey = 'isMilestone';
|
|
473
|
+
if (!isNullOrUndefined(tasks.duration)) {
|
|
474
|
+
var ganttProp = ganttData.ganttProperties;
|
|
475
|
+
var durationValue = data[tasks.duration];
|
|
476
|
+
if (value) {
|
|
477
|
+
durationValue = 0;
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
durationValue = durationValue <= 0 ? 1 : durationValue;
|
|
481
|
+
}
|
|
482
|
+
ganttObj.setRecordValue(tasks.duration, durationValue, ganttData, true);
|
|
483
|
+
ganttObj.setRecordValue('duration', durationValue, ganttProp, true);
|
|
484
|
+
ganttObj.setRecordValue('taskData.' + tasks.duration, durationValue, ganttData);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
466
487
|
else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
|
|
467
488
|
ganttPropKey = 'segments';
|
|
468
489
|
/* eslint-disable-next-line */
|
|
@@ -862,10 +883,11 @@ var Edit = /** @class */ (function () {
|
|
|
862
883
|
this.parent.predecessorModule.isValidatedParentTaskID = '';
|
|
863
884
|
}
|
|
864
885
|
if (this.parent.allowParentDependency && ganttRecord.hasChildRecords && this.parent.previousRecords[ganttRecord.uniqueID].ganttProperties.startDate &&
|
|
865
|
-
(args.action === "DrawConnectorLine")
|
|
886
|
+
(args.action === "DrawConnectorLine")) {
|
|
866
887
|
this.updateChildItems(ganttRecord);
|
|
867
888
|
}
|
|
868
889
|
this.updateParentItemOnEditing();
|
|
890
|
+
this.parent.dataOperation.updateParentItems(ganttRecord, true);
|
|
869
891
|
}
|
|
870
892
|
/** Update parent up-to zeroth level */
|
|
871
893
|
if (ganttRecord.parentItem) {
|
|
@@ -878,6 +900,10 @@ var Edit = /** @class */ (function () {
|
|
|
878
900
|
this.updateParentItemOnEditing();
|
|
879
901
|
}
|
|
880
902
|
}
|
|
903
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit && this.parent.connectorLineEditModule && args.data) {
|
|
904
|
+
this.parent.connectorLineEditModule['calculateOffset'](args.data);
|
|
905
|
+
}
|
|
906
|
+
this.parent.predecessorModule['validatedParentIds'] = [];
|
|
881
907
|
this.initiateSaveAction(args);
|
|
882
908
|
};
|
|
883
909
|
Edit.prototype.updateParentItemOnEditing = function () {
|
|
@@ -897,7 +923,7 @@ var Edit = /** @class */ (function () {
|
|
|
897
923
|
*/
|
|
898
924
|
Edit.prototype.updateParentChildRecord = function (data) {
|
|
899
925
|
var ganttRecord = data;
|
|
900
|
-
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)) {
|
|
901
927
|
this.updateChildItems(ganttRecord);
|
|
902
928
|
}
|
|
903
929
|
if (!isNullOrUndefined(this.parent.editModule.cellEditModule)) {
|
|
@@ -1373,6 +1399,11 @@ var Edit = /** @class */ (function () {
|
|
|
1373
1399
|
this.updateScheduleDatesOnEditing(args);
|
|
1374
1400
|
}
|
|
1375
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
|
+
}
|
|
1376
1407
|
if (!this.parent.editSettings.allowTaskbarEditing || (this.parent.editSettings.allowTaskbarEditing &&
|
|
1377
1408
|
!this.taskbarEditModule.dependencyCancel)) {
|
|
1378
1409
|
eventArgs.requestType = 'save';
|
|
@@ -1386,11 +1417,6 @@ var Edit = /** @class */ (function () {
|
|
|
1386
1417
|
eventArgs.taskBarEditAction = args.taskBarEditAction;
|
|
1387
1418
|
}
|
|
1388
1419
|
this.endEditAction(args);
|
|
1389
|
-
if (this.parent.enableCriticalPath) {
|
|
1390
|
-
var criticalModule = this.parent.criticalPathModule;
|
|
1391
|
-
criticalModule.showCriticalPath(true);
|
|
1392
|
-
criticalModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
|
|
1393
|
-
}
|
|
1394
1420
|
this.parent.trigger('actionComplete', eventArgs);
|
|
1395
1421
|
if (!isNullOrUndefined(this.parent.loadingIndicator) && this.parent.loadingIndicator.indicatorType === "Shimmer") {
|
|
1396
1422
|
this.parent.hideMaskRow();
|
|
@@ -1576,7 +1602,9 @@ var Edit = /** @class */ (function () {
|
|
|
1576
1602
|
if (!this.parent.taskFields.parentID) {
|
|
1577
1603
|
var deleteRecordIDs = [];
|
|
1578
1604
|
deleteRecordIDs.push(deletedRow.ganttProperties.rowUniqueID.toString());
|
|
1579
|
-
this.parent.
|
|
1605
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
1606
|
+
this.parent.editModule.removeFromDataSource(deleteRecordIDs);
|
|
1607
|
+
}
|
|
1580
1608
|
}
|
|
1581
1609
|
var flatRecordIndex = this.parent.flatData.indexOf(deletedRow);
|
|
1582
1610
|
if (gObj.taskFields.parentID) {
|
|
@@ -2865,6 +2893,57 @@ var Edit = /** @class */ (function () {
|
|
|
2865
2893
|
}
|
|
2866
2894
|
}
|
|
2867
2895
|
};
|
|
2896
|
+
/**
|
|
2897
|
+
* Method to update the values to client side from server side.
|
|
2898
|
+
*
|
|
2899
|
+
* @param {Object} e - Defines the new modified data from the server.
|
|
2900
|
+
* @param {ITaskAddedEventArgs} args - Defines the client side data.
|
|
2901
|
+
* @returns {void} .
|
|
2902
|
+
*/
|
|
2903
|
+
Edit.prototype.updateClientDataFromServer = function (e, args) {
|
|
2904
|
+
var serverReturnedValue = e.addedRecords[0];
|
|
2905
|
+
var _aLength = Object.keys(serverReturnedValue).length;
|
|
2906
|
+
for (var j = 0, _a = Object.keys(serverReturnedValue); j < _aLength; j++) {
|
|
2907
|
+
var key = _a[parseInt(j.toString(), 10)];
|
|
2908
|
+
args.data["" + key] = serverReturnedValue["" + key];
|
|
2909
|
+
}
|
|
2910
|
+
if (this.parent.taskFields.id !== null) {
|
|
2911
|
+
args.data.ganttProperties['taskId'] = serverReturnedValue[this.parent.taskFields.id];
|
|
2912
|
+
}
|
|
2913
|
+
if (this.parent.taskFields.name !== null) {
|
|
2914
|
+
args.data.ganttProperties['taskName'] = serverReturnedValue[this.parent.taskFields.name];
|
|
2915
|
+
}
|
|
2916
|
+
if (this.parent.taskFields.startDate !== null) {
|
|
2917
|
+
args.data.ganttProperties['startDate'] = serverReturnedValue[this.parent.taskFields.startDate];
|
|
2918
|
+
}
|
|
2919
|
+
if (this.parent.taskFields.endDate !== null) {
|
|
2920
|
+
args.data.ganttProperties['endDate'] = serverReturnedValue[this.parent.taskFields.endDate];
|
|
2921
|
+
}
|
|
2922
|
+
if (this.parent.taskFields.duration !== null) {
|
|
2923
|
+
args.data.ganttProperties['duration'] = parseInt(serverReturnedValue[this.parent.taskFields.duration]);
|
|
2924
|
+
}
|
|
2925
|
+
if (this.parent.taskFields.durationUnit !== null) {
|
|
2926
|
+
args.data.ganttProperties['durationUnit'] = serverReturnedValue[this.parent.taskFields.durationUnit];
|
|
2927
|
+
}
|
|
2928
|
+
if (this.parent.taskFields.progress !== null) {
|
|
2929
|
+
args.data.ganttProperties['progress'] = serverReturnedValue[this.parent.taskFields.progress];
|
|
2930
|
+
}
|
|
2931
|
+
if (this.parent.taskFields.dependency !== null) {
|
|
2932
|
+
args.data.ganttProperties['dependency'] = serverReturnedValue[this.parent.taskFields.dependency];
|
|
2933
|
+
}
|
|
2934
|
+
if (this.parent.taskFields.parentID !== null) {
|
|
2935
|
+
args.data.ganttProperties['parentID'] = serverReturnedValue[this.parent.taskFields.parentID];
|
|
2936
|
+
}
|
|
2937
|
+
if (this.parent.taskFields.baselineEndDate !== null) {
|
|
2938
|
+
args.data.ganttProperties['baselineEndDate'] = serverReturnedValue[this.parent.taskFields.baselineEndDate];
|
|
2939
|
+
}
|
|
2940
|
+
if (this.parent.taskFields.baselineStartDate !== null) {
|
|
2941
|
+
args.data.ganttProperties['baselineStartDate'] = serverReturnedValue[this.parent.taskFields.baselineStartDate];
|
|
2942
|
+
}
|
|
2943
|
+
if (this.parent.taskFields.resourceInfo !== null) {
|
|
2944
|
+
args.data.ganttProperties['resources'] = serverReturnedValue[this.parent.taskFields.resourceInfo];
|
|
2945
|
+
}
|
|
2946
|
+
};
|
|
2868
2947
|
/**
|
|
2869
2948
|
* Method to add new record.
|
|
2870
2949
|
*
|
|
@@ -2926,7 +3005,8 @@ var Edit = /** @class */ (function () {
|
|
|
2926
3005
|
/* tslint:disable-next-line */
|
|
2927
3006
|
var query = _this.parent.query instanceof Query ? _this.parent.query : new Query();
|
|
2928
3007
|
var adaptor = data_2.adaptor;
|
|
2929
|
-
|
|
3008
|
+
var moduleName = adaptor.getModuleName();
|
|
3009
|
+
if (!(moduleName == "WebApiAdaptor" || moduleName == "ODataAdaptor" || moduleName == "ODataV4Adaptor") || data_2.dataSource.batchUrl) {
|
|
2930
3010
|
/* tslint:disable-next-line */
|
|
2931
3011
|
var crud = data_2.saveChanges(updatedData_2, _this.parent.taskFields.id, null, query);
|
|
2932
3012
|
crud.then(function (e) {
|
|
@@ -2936,6 +3016,7 @@ var Edit = /** @class */ (function () {
|
|
|
2936
3016
|
_this.parent.setRecordValue('taskData', e.addedRecords[0], args.data);
|
|
2937
3017
|
_this.parent.setRecordValue(_this.parent.taskFields.id, e.addedRecords[0][_this.parent.taskFields.id], args.data);
|
|
2938
3018
|
_this.parent.setRecordValue('rowUniqueID', e.addedRecords[0][_this.parent.taskFields.id].toString(), args.data.ganttProperties, true);
|
|
3019
|
+
_this.updateClientDataFromServer(e, args);
|
|
2939
3020
|
var idsIndex = _this.parent.ids.indexOf(prevID_1);
|
|
2940
3021
|
if (idsIndex !== -1) {
|
|
2941
3022
|
_this.parent.ids[idsIndex] = e.addedRecords[0][_this.parent.taskFields.id].toString();
|
|
@@ -294,6 +294,9 @@ var Filter = /** @class */ (function () {
|
|
|
294
294
|
break;
|
|
295
295
|
}
|
|
296
296
|
if (!isNullOrUndefined(this.parent.element.parentNode)) {
|
|
297
|
+
if (parentNode.parentNode instanceof HTMLDocument) {
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
297
300
|
parentNode = parentNode.parentNode;
|
|
298
301
|
marginLeft = parentNode.style.marginLeft;
|
|
299
302
|
}
|
|
@@ -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);
|
|
@@ -259,7 +264,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
259
264
|
}
|
|
260
265
|
}
|
|
261
266
|
if (this.parent.editSettings.allowTaskbarEditing && element) {
|
|
262
|
-
this.showHideTaskBarEditingElements(element, this.
|
|
267
|
+
this.showHideTaskBarEditingElements(element, this.editElement);
|
|
263
268
|
this.editElement = element;
|
|
264
269
|
this.realTaskbarElement = this.editElement;
|
|
265
270
|
var index = this.editElement.getAttribute('data-segment-index');
|
|
@@ -340,7 +345,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
340
345
|
else {
|
|
341
346
|
if (this.parent.isAdaptive) {
|
|
342
347
|
if (this.taskBarEditElement) {
|
|
343
|
-
this.showHideTaskBarEditingElements(element, this.
|
|
348
|
+
this.showHideTaskBarEditingElements(element, this.editElement);
|
|
344
349
|
}
|
|
345
350
|
this.initPublicProp();
|
|
346
351
|
}
|
|
@@ -400,8 +405,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
400
405
|
&& isShowConnectorPoints) {
|
|
401
406
|
var connectorElement = !isNullOrUndefined(element.querySelector('.' + cls.connectorPointLeft)) ?
|
|
402
407
|
element : element.parentElement;
|
|
403
|
-
|
|
404
|
-
|
|
408
|
+
if (!isNullOrUndefined(connectorElement.querySelector('.' + cls.connectorPointLeft))) {
|
|
409
|
+
addClass([connectorElement.querySelector('.' + cls.connectorPointLeft)], [cls.connectorPointLeftHover]);
|
|
410
|
+
}
|
|
411
|
+
if (!isNullOrUndefined(connectorElement.querySelector('.' + cls.connectorPointRight))) {
|
|
412
|
+
addClass([connectorElement.querySelector('.' + cls.connectorPointRight)], [cls.connectorPointRightHover]);
|
|
413
|
+
}
|
|
405
414
|
}
|
|
406
415
|
}
|
|
407
416
|
else if (!fadeConnectorLine) {
|
|
@@ -528,7 +537,8 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
528
537
|
var item = this.taskBarEditRecord.ganttProperties;
|
|
529
538
|
this.previousItem = this.parent.timelineModule.extendFunction(item, this.previousItemProperty);
|
|
530
539
|
if (this.taskBarEditAction !== 'ConnectorPointLeftDrag' &&
|
|
531
|
-
this.taskBarEditAction !== 'ConnectorPointRightDrag'
|
|
540
|
+
this.taskBarEditAction !== 'ConnectorPointRightDrag' &&
|
|
541
|
+
!(this.parent.viewType == 'ResourceView' && this.taskBarEditAction == 'ParentDrag')) {
|
|
532
542
|
this.editTooltip.showHideTaskbarEditTooltip(true, this.segmentIndex);
|
|
533
543
|
}
|
|
534
544
|
this.taskBarEditElement.setAttribute('aria-grabbed', 'true');
|
|
@@ -566,6 +576,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
566
576
|
this.dragMouseLeave = false;
|
|
567
577
|
this.isMouseDragCheck();
|
|
568
578
|
if (this.isMouseDragged && this.taskBarEditAction) {
|
|
579
|
+
event.preventDefault();
|
|
569
580
|
if (!isNullOrUndefined(this.taskbarElement) && !isNullOrUndefined(this.editElement) && (this.taskBarEditAction !== "ConnectorPointRightDrag" && this.taskBarEditAction !== "ConnectorPointLeftDrag") && !(this.parent.viewType === 'ResourceView' && this.currentData.hasChildRecords)) {
|
|
570
581
|
var currentElement = this.editElement.parentElement;
|
|
571
582
|
currentElement.style.setProperty("position", "absolute");
|
|
@@ -655,9 +666,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
655
666
|
this.taskBarEditAction === 'ConnectorPointRightDrag') {
|
|
656
667
|
this.updateConnectorLineSecondProperties(e);
|
|
657
668
|
this.triggerDependencyEvent(e);
|
|
658
|
-
|
|
659
|
-
this.drawFalseLine();
|
|
660
|
-
}
|
|
669
|
+
this.drawFalseLine();
|
|
661
670
|
}
|
|
662
671
|
if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
|
|
663
672
|
if (this.dragMoveY > this.mouseMoveY) {
|
|
@@ -669,7 +678,12 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
669
678
|
this.currentItemTop = this.currentItemTop + this.mouseMoveY;
|
|
670
679
|
}
|
|
671
680
|
var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
|
|
672
|
-
this.
|
|
681
|
+
if (this.parent.isAdaptive || e.touches) {
|
|
682
|
+
this.dragMoveY = e.touches[0].pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
683
|
+
}
|
|
684
|
+
else {
|
|
685
|
+
this.dragMoveY = e.pageY - containerPosition.top + this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
686
|
+
}
|
|
673
687
|
this.topValue = this.currentItemTop;
|
|
674
688
|
this.currentItemPrevTop = (this.currentItemPrevTop === 0 ||
|
|
675
689
|
this.topValue == this.currentItemTop) ? this.topValue :
|
|
@@ -1056,6 +1070,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1056
1070
|
if (this.segmentIndex === 0) {
|
|
1057
1071
|
this.parent.setRecordValue('width', item.width - differenceWidth, item, true);
|
|
1058
1072
|
this.parent.setRecordValue('left', item.left + differenceWidth, item, true);
|
|
1073
|
+
segment.width = segment.width - differenceWidth;
|
|
1059
1074
|
for (var i = 1; i < item.segments.length; i++) {
|
|
1060
1075
|
var segment_3 = segments[i];
|
|
1061
1076
|
segment_3.left = segment_3.left - differenceWidth;
|
|
@@ -1536,6 +1551,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1536
1551
|
var traceParentTaskBar = this.taskBarEditElement.querySelector('.' + cls.traceParentTaskBar);
|
|
1537
1552
|
var traceParentProgressBar = this.taskBarEditElement.querySelector('.' + cls.traceParentProgressBar);
|
|
1538
1553
|
var traceConnectorPointRight = this.taskBarEditElement.querySelector('.' + cls.rightConnectorPointOuterDiv);
|
|
1554
|
+
var segmentConnectorPointRight = taskBarMainContainer.querySelector('.' + cls.rightConnectorPointOuterDiv);
|
|
1539
1555
|
var manualParentTaskbar = this.taskBarEditElement;
|
|
1540
1556
|
var manualTaskbar = this.taskBarEditElement.querySelector('.' + cls.manualParentTaskBar);
|
|
1541
1557
|
var manualParentRight = this.taskBarEditElement.querySelector('.' + cls.manualParentRightResizer);
|
|
@@ -1562,6 +1578,9 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1562
1578
|
}
|
|
1563
1579
|
taskBarMainContainer.style.setProperty(position, (item.left) + 'px');
|
|
1564
1580
|
taskBarMainContainer.style.width = (width) + 'px';
|
|
1581
|
+
if (segmentedTaskBarContainer && segmentConnectorPointRight) {
|
|
1582
|
+
segmentConnectorPointRight.style.left = (this.parent.isAdaptive ? (width + 10) : (width + 2)) + 'px';
|
|
1583
|
+
}
|
|
1565
1584
|
if (this.parent.viewType === 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.parent.rowDragAndDropModule &&
|
|
1566
1585
|
(this.taskBarEditAction === 'ChildDrag' || this.taskBarEditAction === 'MilestoneDrag')) {
|
|
1567
1586
|
taskBarMainContainer.style.setProperty('top', (this.topValue) + 'px');
|
|
@@ -1678,9 +1697,9 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1678
1697
|
}
|
|
1679
1698
|
if (segmentedTaskBarContainer) {
|
|
1680
1699
|
taskBarRightResizer.style.setProperty(position, rightResizer + 'px');
|
|
1681
|
-
traceChildProgressBar.style.width = (segment.
|
|
1700
|
+
traceChildProgressBar.style.width = (segment.width) + 'px';
|
|
1682
1701
|
if (!isNullOrUndefined(childProgressResizer)) {
|
|
1683
|
-
childProgressResizer.style.setProperty(position, segment.
|
|
1702
|
+
childProgressResizer.style.setProperty(position, segment.width - 10 + 'px');
|
|
1684
1703
|
}
|
|
1685
1704
|
}
|
|
1686
1705
|
}
|
|
@@ -1750,9 +1769,6 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
1750
1769
|
this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor && (!this.connectorSecondRecord.hasChildRecords ||
|
|
1751
1770
|
this.connectorSecondRecord.hasChildRecords && this.parent.allowParentDependency)) {
|
|
1752
1771
|
this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
|
|
1753
|
-
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
1754
|
-
this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
|
|
1755
|
-
}
|
|
1756
1772
|
}
|
|
1757
1773
|
else {
|
|
1758
1774
|
if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
|
|
@@ -2042,6 +2058,7 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
2042
2058
|
TaskbarEdit.prototype.updateConnectorLineSecondProperties = function (e) {
|
|
2043
2059
|
var target = this.getElementByPosition(e);
|
|
2044
2060
|
var element = parentsUntil(target, cls.taskBarMainContainer);
|
|
2061
|
+
var isBigger = document.body.className.includes("e-bigger");
|
|
2045
2062
|
this.connectorSecondAction = null;
|
|
2046
2063
|
var scrollTop = 0;
|
|
2047
2064
|
if (parentsUntil(target, cls.connectorPointLeft)) {
|
|
@@ -2064,20 +2081,20 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
2064
2081
|
if ((this.parent.virtualScrollModule && this.parent.enableVirtualization &&
|
|
2065
2082
|
!this.elementOffsetLeft) || !this.parent.enableVirtualization) {
|
|
2066
2083
|
if (!this.parent.allowParentDependency) {
|
|
2067
|
-
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
|
|
2084
|
+
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
2068
2085
|
this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
|
|
2069
2086
|
}
|
|
2070
2087
|
else {
|
|
2071
2088
|
if (this.taskBarEditElement.children[0].classList.contains('e-manualparent-main-container')) {
|
|
2072
|
-
this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft;
|
|
2089
|
+
this.elementOffsetLeft = this.realTaskbarElement.children[0]['offsetLeft'] + this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
2073
2090
|
this.elementOffsetTop = ((this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 - 5) + this.taskBarEditElement.children[0]['offsetTop']) + scrollTop;
|
|
2074
2091
|
}
|
|
2075
2092
|
else {
|
|
2076
|
-
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft;
|
|
2093
|
+
this.elementOffsetLeft = this.realTaskbarElement.offsetLeft - ((isBigger) ? 10 : 0);
|
|
2077
2094
|
this.elementOffsetTop = this.realTaskbarElement.parentElement.offsetTop + this.realTaskbarElement.offsetHeight / 3 + scrollTop;
|
|
2078
2095
|
}
|
|
2079
2096
|
}
|
|
2080
|
-
this.elementOffsetWidth = this.realTaskbarElement.offsetWidth;
|
|
2097
|
+
this.elementOffsetWidth = this.realTaskbarElement.offsetWidth + ((isBigger) ? 20 : 0);
|
|
2081
2098
|
this.elementOffsetHeight = this.realTaskbarElement.offsetHeight;
|
|
2082
2099
|
}
|
|
2083
2100
|
this.showHideTaskBarEditingElements(element, this.highlightedSecondElement, true);
|
|
@@ -2185,18 +2202,16 @@ var TaskbarEdit = /** @class */ (function (_super) {
|
|
|
2185
2202
|
// Get XY coordinates for touch and non-touch device
|
|
2186
2203
|
TaskbarEdit.prototype.getCoordinate = function (event) {
|
|
2187
2204
|
var coordinates = {};
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2205
|
+
var e = event;
|
|
2206
|
+
coordinates.pageX = e.pageX;
|
|
2207
|
+
coordinates.pageY = e.pageY;
|
|
2208
|
+
if (event && event.type !== 'click') {
|
|
2209
|
+
var e_1 = event;
|
|
2210
|
+
if (e_1.type === 'touchmove' || e_1.type === 'touchstart' || e_1.type === 'touchend') {
|
|
2211
|
+
coordinates.pageX = e_1.changedTouches[0].pageX;
|
|
2212
|
+
coordinates.pageY = e_1.changedTouches[0].pageY;
|
|
2193
2213
|
}
|
|
2194
2214
|
}
|
|
2195
|
-
else if (event) {
|
|
2196
|
-
var e = event;
|
|
2197
|
-
coordinates.pageX = e.pageX;
|
|
2198
|
-
coordinates.pageY = e.pageY;
|
|
2199
|
-
}
|
|
2200
2215
|
return coordinates;
|
|
2201
2216
|
};
|
|
2202
2217
|
// 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 {
|
|
@@ -1332,8 +1332,8 @@ var DateProcessor = /** @class */ (function () {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
if (!editArgs) {
|
|
1334
1334
|
this.prevProjectStartDate = this.parent.cloneProjectStartDate;
|
|
1335
|
-
this.parent.cloneProjectStartDate = minStartDate ? minStartDate : new Date(projectStartDate.getTime());
|
|
1336
|
-
this.parent.cloneProjectEndDate = maxEndDate ? maxEndDate : new Date(projectEndDate.getTime());
|
|
1335
|
+
this.parent.cloneProjectStartDate = minStartDate ? (!this.parent.timelineModule.isZoomToFit) ? (!isNullOrUndefined(projectStartDate)) ? new Date(projectStartDate.getTime()) : minStartDate : minStartDate : new Date(projectStartDate.getTime());
|
|
1336
|
+
this.parent.cloneProjectEndDate = maxEndDate ? (!this.parent.timelineModule.isZoomToFit) ? (!isNullOrUndefined(projectEndDate)) ? new Date(projectEndDate.getTime()) : maxEndDate : maxEndDate : new Date(projectEndDate.getTime());
|
|
1337
1337
|
}
|
|
1338
1338
|
else {
|
|
1339
1339
|
setValue('minStartDate', minStartDate, editArgs);
|