@syncfusion/ej2-gantt 22.2.9 → 22.2.10
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 +10 -0
- 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 +70 -22
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +70 -22
- 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 +10 -10
- package/src/gantt/actions/critical-path.js +59 -18
- package/src/gantt/actions/edit.js +1 -1
- package/src/gantt/base/gantt.js +3 -0
- package/src/gantt/base/splitter.js +4 -0
- package/src/gantt/base/task-processor.js +3 -3
|
@@ -1989,9 +1989,9 @@ class TaskProcessor extends DateProcessor {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
else {
|
|
1991
1991
|
let uniqueId = ganttData.uniqueID.replace(this.parent.element.id + '_data_', '');
|
|
1992
|
-
if (this.parent.viewType === 'ResourceView' && typeof
|
|
1993
|
-
|
|
1994
|
-
}
|
|
1992
|
+
// if (this.parent.viewType === 'ResourceView' && typeof(ganttData.ganttProperties.taskId) === "string") {
|
|
1993
|
+
// uniqueId = ganttProperties.taskId.toString();
|
|
1994
|
+
// }
|
|
1995
1995
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttData);
|
|
1996
1996
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttProperties, true);
|
|
1997
1997
|
this.parent.setRecordValue('sharedTaskUniqueIds', [], ganttProperties, true);
|
|
@@ -12754,8 +12754,12 @@ class Splitter$1 {
|
|
|
12754
12754
|
},
|
|
12755
12755
|
resizing: (args) => {
|
|
12756
12756
|
this.parent.trigger('splitterResizing', args);
|
|
12757
|
+
if (this.parent.timelineModule.isZoomToFit) {
|
|
12758
|
+
this.parent.timelineModule.updateTimelineAfterZooming(this.parent.timelineModule.timelineEndDate, true);
|
|
12759
|
+
}
|
|
12757
12760
|
},
|
|
12758
12761
|
resizeStop: (args) => {
|
|
12762
|
+
this.parent['calculateDimensions']();
|
|
12759
12763
|
const leftPane = args.pane[0];
|
|
12760
12764
|
this.splitterPreviousPositionGrid = leftPane.scrollWidth + 1 + 'px';
|
|
12761
12765
|
this.splitterObject.paneSettings[0].size = this.getSpliterPositionInPercentage(this.splitterPreviousPositionGrid);
|
|
@@ -14518,6 +14522,9 @@ let Gantt = class Gantt extends Component {
|
|
|
14518
14522
|
this.splitterModule.splitterPreviousPositionChart = pane2.scrollWidth + 1 + 'px';
|
|
14519
14523
|
this.splitterModule.splitterObject.paneSettings[0].size = this.splitterModule['getSpliterPositionInPercentage'](this.splitterModule.splitterPreviousPositionGrid);
|
|
14520
14524
|
this.splitterModule.splitterObject.paneSettings[1].size = this.splitterModule.splitterPreviousPositionChart;
|
|
14525
|
+
if (this.timelineModule.isZoomToFit) {
|
|
14526
|
+
this.timelineModule.processZoomToFit();
|
|
14527
|
+
}
|
|
14521
14528
|
}
|
|
14522
14529
|
}
|
|
14523
14530
|
keyActionHandler(e) {
|
|
@@ -25107,7 +25114,7 @@ class Edit$2 {
|
|
|
25107
25114
|
this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
|
|
25108
25115
|
}
|
|
25109
25116
|
if (this.parent.viewType === 'ResourceView') {
|
|
25110
|
-
if (args.action === 'TaskbarEditing') {
|
|
25117
|
+
if (args.action === 'TaskbarEditing' || args.action === 'DrawConnectorLine') {
|
|
25111
25118
|
this.updateSharedTask(args.data);
|
|
25112
25119
|
}
|
|
25113
25120
|
else if (args.action === 'DialogEditing' || args.action === 'CellEditing' || args.action === 'methodUpdate') {
|
|
@@ -30191,14 +30198,68 @@ class CriticalPath {
|
|
|
30191
30198
|
let criticalPathIds = [];
|
|
30192
30199
|
let index;
|
|
30193
30200
|
let predecessorFrom;
|
|
30194
|
-
|
|
30201
|
+
const slackindexes = [];
|
|
30202
|
+
const indexes = [];
|
|
30203
|
+
for (let z = flatRecords.length - 1; z >= 0; z--) {
|
|
30204
|
+
if (flatRecords[parseInt(z.toString(), 10)].slack === '0 day') {
|
|
30205
|
+
const index1 = flatRecords[parseInt(z.toString(), 10)].index;
|
|
30206
|
+
slackindexes.push(index1);
|
|
30207
|
+
}
|
|
30208
|
+
}
|
|
30209
|
+
const num = 0;
|
|
30210
|
+
indexes.push(slackindexes[parseInt(num.toString(), 10)]);
|
|
30211
|
+
for (let j = 0; j < indexes.length; j++) {
|
|
30212
|
+
const i = flatRecords[indexes[parseInt(j.toString(), 10)]].ganttProperties.predecessor;
|
|
30213
|
+
if (!isNullOrUndefined(i)) {
|
|
30214
|
+
for (let f = i.length - 1; f >= 0; f--) {
|
|
30215
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30216
|
+
const q = modelRecordIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30217
|
+
for (let k = 0; k < indexes.length; k++) {
|
|
30218
|
+
const item = indexes[parseInt(j.toString(), 10)];
|
|
30219
|
+
if (item !== q) {
|
|
30220
|
+
indexes.push(q);
|
|
30221
|
+
}
|
|
30222
|
+
break;
|
|
30223
|
+
}
|
|
30224
|
+
}
|
|
30225
|
+
else {
|
|
30226
|
+
const q = this.resourceCollectionIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30227
|
+
for (let k = 0; k < indexes.length; k++) {
|
|
30228
|
+
const item = indexes[parseInt(j.toString(), 10)];
|
|
30229
|
+
if (item !== q) {
|
|
30230
|
+
indexes.push(q);
|
|
30231
|
+
}
|
|
30232
|
+
break;
|
|
30233
|
+
}
|
|
30234
|
+
}
|
|
30235
|
+
}
|
|
30236
|
+
}
|
|
30237
|
+
}
|
|
30238
|
+
for (let x = 0; x < indexes.length; x++) {
|
|
30195
30239
|
if (this.parent.viewType === 'ProjectView') {
|
|
30196
|
-
index = modelRecordIds.indexOf(
|
|
30240
|
+
index = modelRecordIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['ganttProperties']['taskId'].toString());
|
|
30197
30241
|
}
|
|
30198
30242
|
else {
|
|
30199
|
-
index = this.resourceCollectionIds.indexOf(
|
|
30243
|
+
index = this.resourceCollectionIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['TaskID'].toString());
|
|
30200
30244
|
}
|
|
30201
30245
|
const predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
30246
|
+
if (isNullOrUndefined(predecessorLength)) {
|
|
30247
|
+
if (taskBeyondEnddate.length > 0) {
|
|
30248
|
+
for (let i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30249
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30250
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30251
|
+
}
|
|
30252
|
+
else {
|
|
30253
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30254
|
+
}
|
|
30255
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30256
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
30257
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30258
|
+
}
|
|
30259
|
+
}
|
|
30260
|
+
}
|
|
30261
|
+
break;
|
|
30262
|
+
}
|
|
30202
30263
|
const noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
30203
30264
|
for (let i = predecessorLength.length - 1; i >= 0; i--) {
|
|
30204
30265
|
let toID;
|
|
@@ -30262,21 +30323,8 @@ class CriticalPath {
|
|
|
30262
30323
|
flatRecords[index].isCritical = true;
|
|
30263
30324
|
flatRecords[index].ganttProperties.isCritical = true;
|
|
30264
30325
|
this.criticalTasks.push(flatRecords[index]);
|
|
30265
|
-
|
|
30266
|
-
|
|
30267
|
-
}
|
|
30268
|
-
}
|
|
30269
|
-
if (taskBeyondEnddate.length > 0) {
|
|
30270
|
-
for (let i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30271
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
30272
|
-
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30273
|
-
}
|
|
30274
|
-
else {
|
|
30275
|
-
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30276
|
-
}
|
|
30277
|
-
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30278
|
-
this.criticalTasks.push(flatRecords[index]);
|
|
30279
|
-
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30326
|
+
const num = flatRecords[parseInt(index.toString(), 10)]['ganttProperties']['taskId'];
|
|
30327
|
+
criticalPathIds.push(num);
|
|
30280
30328
|
}
|
|
30281
30329
|
}
|
|
30282
30330
|
}
|