@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
|
@@ -2026,9 +2026,9 @@ var TaskProcessor = /** @__PURE__ @class */ (function (_super) {
|
|
|
2026
2026
|
}
|
|
2027
2027
|
else {
|
|
2028
2028
|
var uniqueId = ganttData.uniqueID.replace(this.parent.element.id + '_data_', '');
|
|
2029
|
-
if (this.parent.viewType === 'ResourceView' && typeof
|
|
2030
|
-
|
|
2031
|
-
}
|
|
2029
|
+
// if (this.parent.viewType === 'ResourceView' && typeof(ganttData.ganttProperties.taskId) === "string") {
|
|
2030
|
+
// uniqueId = ganttProperties.taskId.toString();
|
|
2031
|
+
// }
|
|
2032
2032
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttData);
|
|
2033
2033
|
this.parent.setRecordValue('rowUniqueID', uniqueId, ganttProperties, true);
|
|
2034
2034
|
this.parent.setRecordValue('sharedTaskUniqueIds', [], ganttProperties, true);
|
|
@@ -13169,8 +13169,12 @@ var Splitter$1 = /** @__PURE__ @class */ (function () {
|
|
|
13169
13169
|
},
|
|
13170
13170
|
resizing: function (args) {
|
|
13171
13171
|
_this.parent.trigger('splitterResizing', args);
|
|
13172
|
+
if (_this.parent.timelineModule.isZoomToFit) {
|
|
13173
|
+
_this.parent.timelineModule.updateTimelineAfterZooming(_this.parent.timelineModule.timelineEndDate, true);
|
|
13174
|
+
}
|
|
13172
13175
|
},
|
|
13173
13176
|
resizeStop: function (args) {
|
|
13177
|
+
_this.parent['calculateDimensions']();
|
|
13174
13178
|
var leftPane = args.pane[0];
|
|
13175
13179
|
_this.splitterPreviousPositionGrid = leftPane.scrollWidth + 1 + 'px';
|
|
13176
13180
|
_this.splitterObject.paneSettings[0].size = _this.getSpliterPositionInPercentage(_this.splitterPreviousPositionGrid);
|
|
@@ -14951,6 +14955,9 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
|
|
|
14951
14955
|
this.splitterModule.splitterPreviousPositionChart = pane2.scrollWidth + 1 + 'px';
|
|
14952
14956
|
this.splitterModule.splitterObject.paneSettings[0].size = this.splitterModule['getSpliterPositionInPercentage'](this.splitterModule.splitterPreviousPositionGrid);
|
|
14953
14957
|
this.splitterModule.splitterObject.paneSettings[1].size = this.splitterModule.splitterPreviousPositionChart;
|
|
14958
|
+
if (this.timelineModule.isZoomToFit) {
|
|
14959
|
+
this.timelineModule.processZoomToFit();
|
|
14960
|
+
}
|
|
14954
14961
|
}
|
|
14955
14962
|
};
|
|
14956
14963
|
Gantt.prototype.keyActionHandler = function (e) {
|
|
@@ -25631,7 +25638,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
25631
25638
|
this.parent.timelineModule.updateTimeLineOnEditing([tempArray], args.action);
|
|
25632
25639
|
}
|
|
25633
25640
|
if (this.parent.viewType === 'ResourceView') {
|
|
25634
|
-
if (args.action === 'TaskbarEditing') {
|
|
25641
|
+
if (args.action === 'TaskbarEditing' || args.action === 'DrawConnectorLine') {
|
|
25635
25642
|
this.updateSharedTask(args.data);
|
|
25636
25643
|
}
|
|
25637
25644
|
else if (args.action === 'DialogEditing' || args.action === 'CellEditing' || args.action === 'methodUpdate') {
|
|
@@ -30761,14 +30768,68 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30761
30768
|
var criticalPathIds = [];
|
|
30762
30769
|
var index;
|
|
30763
30770
|
var predecessorFrom;
|
|
30764
|
-
|
|
30771
|
+
var slackindexes = [];
|
|
30772
|
+
var indexes = [];
|
|
30773
|
+
for (var z = flatRecords.length - 1; z >= 0; z--) {
|
|
30774
|
+
if (flatRecords[parseInt(z.toString(), 10)].slack === '0 day') {
|
|
30775
|
+
var index1 = flatRecords[parseInt(z.toString(), 10)].index;
|
|
30776
|
+
slackindexes.push(index1);
|
|
30777
|
+
}
|
|
30778
|
+
}
|
|
30779
|
+
var num = 0;
|
|
30780
|
+
indexes.push(slackindexes[parseInt(num.toString(), 10)]);
|
|
30781
|
+
for (var j = 0; j < indexes.length; j++) {
|
|
30782
|
+
var i = flatRecords[indexes[parseInt(j.toString(), 10)]].ganttProperties.predecessor;
|
|
30783
|
+
if (!isNullOrUndefined(i)) {
|
|
30784
|
+
for (var f = i.length - 1; f >= 0; f--) {
|
|
30785
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30786
|
+
var q = modelRecordIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30787
|
+
for (var k = 0; k < indexes.length; k++) {
|
|
30788
|
+
var item = indexes[parseInt(j.toString(), 10)];
|
|
30789
|
+
if (item !== q) {
|
|
30790
|
+
indexes.push(q);
|
|
30791
|
+
}
|
|
30792
|
+
break;
|
|
30793
|
+
}
|
|
30794
|
+
}
|
|
30795
|
+
else {
|
|
30796
|
+
var q = this.resourceCollectionIds.indexOf(i[parseInt(f.toString(), 10)]['from']);
|
|
30797
|
+
for (var k = 0; k < indexes.length; k++) {
|
|
30798
|
+
var item = indexes[parseInt(j.toString(), 10)];
|
|
30799
|
+
if (item !== q) {
|
|
30800
|
+
indexes.push(q);
|
|
30801
|
+
}
|
|
30802
|
+
break;
|
|
30803
|
+
}
|
|
30804
|
+
}
|
|
30805
|
+
}
|
|
30806
|
+
}
|
|
30807
|
+
}
|
|
30808
|
+
for (var x = 0; x < indexes.length; x++) {
|
|
30765
30809
|
if (this.parent.viewType === 'ProjectView') {
|
|
30766
|
-
index = modelRecordIds.indexOf(
|
|
30810
|
+
index = modelRecordIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['ganttProperties']['taskId'].toString());
|
|
30767
30811
|
}
|
|
30768
30812
|
else {
|
|
30769
|
-
index = this.resourceCollectionIds.indexOf(
|
|
30813
|
+
index = this.resourceCollectionIds.indexOf(flatRecords[indexes[parseInt(x.toString(), 10)]]['TaskID'].toString());
|
|
30770
30814
|
}
|
|
30771
30815
|
var predecessorLength = flatRecords[index].ganttProperties.predecessor;
|
|
30816
|
+
if (isNullOrUndefined(predecessorLength)) {
|
|
30817
|
+
if (taskBeyondEnddate.length > 0) {
|
|
30818
|
+
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30819
|
+
if (this.parent.viewType === 'ProjectView') {
|
|
30820
|
+
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30821
|
+
}
|
|
30822
|
+
else {
|
|
30823
|
+
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30824
|
+
}
|
|
30825
|
+
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30826
|
+
this.criticalTasks.push(flatRecords[index]);
|
|
30827
|
+
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30828
|
+
}
|
|
30829
|
+
}
|
|
30830
|
+
}
|
|
30831
|
+
break;
|
|
30832
|
+
}
|
|
30772
30833
|
var noSlackValue = 0 + ' ' + flatRecords[index].ganttProperties.durationUnit;
|
|
30773
30834
|
for (var i = predecessorLength.length - 1; i >= 0; i--) {
|
|
30774
30835
|
var toID = void 0;
|
|
@@ -30832,21 +30893,8 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
30832
30893
|
flatRecords[index].isCritical = true;
|
|
30833
30894
|
flatRecords[index].ganttProperties.isCritical = true;
|
|
30834
30895
|
this.criticalTasks.push(flatRecords[index]);
|
|
30835
|
-
|
|
30836
|
-
|
|
30837
|
-
}
|
|
30838
|
-
}
|
|
30839
|
-
if (taskBeyondEnddate.length > 0) {
|
|
30840
|
-
for (var i = 0; i < taskBeyondEnddate.length; i++) {
|
|
30841
|
-
if (this.parent.viewType === 'ProjectView') {
|
|
30842
|
-
index = modelRecordIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30843
|
-
}
|
|
30844
|
-
else {
|
|
30845
|
-
index = this.resourceCollectionIds.indexOf(taskBeyondEnddate[i].toString());
|
|
30846
|
-
}
|
|
30847
|
-
if (index !== -1 && flatRecords[index].ganttProperties.progress < 100) {
|
|
30848
|
-
this.criticalTasks.push(flatRecords[index]);
|
|
30849
|
-
criticalPathIds = criticalPathIds.concat(taskBeyondEnddate[i]);
|
|
30896
|
+
var num_1 = flatRecords[parseInt(index.toString(), 10)]['ganttProperties']['taskId'];
|
|
30897
|
+
criticalPathIds.push(num_1);
|
|
30850
30898
|
}
|
|
30851
30899
|
}
|
|
30852
30900
|
}
|