@syncfusion/ej2-gantt 20.2.44 → 20.2.49
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 +26 -0
- 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 +26 -9
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +26 -9
- 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 +18 -18
- package/src/gantt/actions/rowdragdrop.js +2 -2
- package/src/gantt/base/date-processor.js +3 -0
- package/src/gantt/base/gantt-chart.js +1 -1
- package/src/gantt/base/splitter.js +3 -1
- package/src/gantt/base/task-processor.js +4 -1
- package/src/gantt/renderer/chart-rows.js +12 -3
- package/src/gantt/renderer/timeline.js +1 -1
|
@@ -652,6 +652,9 @@ class DateProcessor {
|
|
|
652
652
|
*/
|
|
653
653
|
getProjectStartDate(ganttProp, isLoad) {
|
|
654
654
|
if (!isNullOrUndefined(this.parent.cloneProjectStartDate)) {
|
|
655
|
+
if (typeof this.parent.cloneProjectStartDate === 'string') {
|
|
656
|
+
this.parent.cloneProjectStartDate = this.getDateFromFormat(this.parent.cloneProjectStartDate);
|
|
657
|
+
}
|
|
655
658
|
const cloneStartDate = this.checkStartDate(this.parent.cloneProjectStartDate);
|
|
656
659
|
this.parent.cloneProjectStartDate = cloneStartDate;
|
|
657
660
|
return new Date(cloneStartDate.getTime());
|
|
@@ -1853,7 +1856,10 @@ class TaskProcessor extends DateProcessor {
|
|
|
1853
1856
|
this.setTime(this.parent.defaultEndTime, baselineEndDate);
|
|
1854
1857
|
}
|
|
1855
1858
|
if ((ganttProperties.baselineStartDate && baselineEndDate &&
|
|
1856
|
-
(ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) ||
|
|
1859
|
+
(ganttProperties.baselineStartDate.getTime() > baselineEndDate.getTime())) ||
|
|
1860
|
+
((!isNullOrUndefined(ganttProperties.baselineStartDate) && !isNullOrUndefined(ganttProperties.startDate) && (ganttProperties.baselineStartDate.getTime() === ganttProperties.startDate.getTime()))
|
|
1861
|
+
&& (!isNullOrUndefined(baselineEndDate) && !isNullOrUndefined(ganttProperties.endDate) && (baselineEndDate.toLocaleDateString() === ganttProperties.endDate.toLocaleDateString())) &&
|
|
1862
|
+
ganttProperties.isMilestone)) {
|
|
1857
1863
|
baselineEndDate = ganttProperties.baselineStartDate;
|
|
1858
1864
|
}
|
|
1859
1865
|
this.parent.setRecordValue('baselineEndDate', this.checkBaselineEndDate(baselineEndDate, ganttProperties), ganttProperties, true);
|
|
@@ -4822,7 +4828,7 @@ class GanttChart {
|
|
|
4822
4828
|
* @private
|
|
4823
4829
|
*/
|
|
4824
4830
|
expandedGanttRow(args) {
|
|
4825
|
-
if ((isNullOrUndefined(args['gridRow']) || isNullOrUndefined(args['chartRow']))
|
|
4831
|
+
if ((isNullOrUndefined(args['gridRow']) && this.parent.enableVirtualization) || isNullOrUndefined(args['chartRow'])) {
|
|
4826
4832
|
return;
|
|
4827
4833
|
}
|
|
4828
4834
|
const record = getValue('data', args);
|
|
@@ -6276,7 +6282,7 @@ class Timeline {
|
|
|
6276
6282
|
endDate.setHours(24, 0, 0, 0);
|
|
6277
6283
|
}
|
|
6278
6284
|
}
|
|
6279
|
-
if (this.isZooming || this.parent.isLoad) {
|
|
6285
|
+
if ((this.isZooming || this.parent.isLoad) && isNullOrUndefined(this.parent.projectEndDate)) {
|
|
6280
6286
|
this.updateTimelineAfterZooming(endDate, false);
|
|
6281
6287
|
}
|
|
6282
6288
|
return endDate;
|
|
@@ -9334,7 +9340,10 @@ class ChartRows extends DateProcessor {
|
|
|
9334
9340
|
}
|
|
9335
9341
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
9336
9342
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
9337
|
-
taskBaselineTemplateNode = this.
|
|
9343
|
+
taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
9344
|
+
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
|
|
9345
|
+
this.templateData.ganttProperties.isMilestone)
|
|
9346
|
+
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
9338
9347
|
}
|
|
9339
9348
|
}
|
|
9340
9349
|
else if (this.templateData.ganttProperties.isMilestone) {
|
|
@@ -9344,7 +9353,10 @@ class ChartRows extends DateProcessor {
|
|
|
9344
9353
|
}
|
|
9345
9354
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
9346
9355
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
9347
|
-
taskBaselineTemplateNode = this.
|
|
9356
|
+
taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
9357
|
+
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
|
|
9358
|
+
this.templateData.ganttProperties.isMilestone)
|
|
9359
|
+
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
9348
9360
|
}
|
|
9349
9361
|
}
|
|
9350
9362
|
else {
|
|
@@ -9389,7 +9401,10 @@ class ChartRows extends DateProcessor {
|
|
|
9389
9401
|
}
|
|
9390
9402
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
9391
9403
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
9392
|
-
taskBaselineTemplateNode = this.
|
|
9404
|
+
taskBaselineTemplateNode = ((!isNullOrUndefined(this.templateData.ganttProperties.baselineStartDate) && !isNullOrUndefined(this.templateData.ganttProperties.startDate) && (this.templateData.ganttProperties.baselineStartDate.getTime() === this.templateData.ganttProperties.startDate.getTime()))
|
|
9405
|
+
&& (!isNullOrUndefined(this.templateData.ganttProperties.baselineEndDate) && !isNullOrUndefined(this.templateData.ganttProperties.endDate) && (this.templateData.ganttProperties.baselineEndDate.toLocaleDateString() === this.templateData.ganttProperties.endDate.toLocaleDateString())) &&
|
|
9406
|
+
this.templateData.ganttProperties.isMilestone)
|
|
9407
|
+
? this.getMilestoneBaselineNode() : this.getTaskBaselineNode();
|
|
9393
9408
|
}
|
|
9394
9409
|
}
|
|
9395
9410
|
if (!this.templateData.hasChildRecords) {
|
|
@@ -11523,7 +11538,9 @@ class Splitter$1 {
|
|
|
11523
11538
|
this.splitterObject.paneSettings[1].size = null;
|
|
11524
11539
|
this.splitterObject.paneSettings[1].size = this.getSpliterPositionInPercentage(this.splitterPreviousPositionChart);
|
|
11525
11540
|
}
|
|
11526
|
-
|
|
11541
|
+
if (isNullOrUndefined(this.parent.projectEndDate)) {
|
|
11542
|
+
this.parent.timelineModule.updateTimelineAfterZooming(this.parent.timelineModule.timelineEndDate, true);
|
|
11543
|
+
}
|
|
11527
11544
|
callBackPromise.resolve(splitterResizedArgs);
|
|
11528
11545
|
});
|
|
11529
11546
|
return callBackPromise;
|
|
@@ -28376,7 +28393,7 @@ class RowDD$1 {
|
|
|
28376
28393
|
let currentData = this.parent.currentViewData.filter(function (e) {
|
|
28377
28394
|
return e[uniqueTaskID] === ganttData[i][uniqueTaskID];
|
|
28378
28395
|
})[0];
|
|
28379
|
-
if (currentData.index > droppedRecord.index) {
|
|
28396
|
+
if (currentData && currentData.index > droppedRecord.index) {
|
|
28380
28397
|
endIndex = currentData.index;
|
|
28381
28398
|
break;
|
|
28382
28399
|
}
|
|
@@ -28388,7 +28405,7 @@ class RowDD$1 {
|
|
|
28388
28405
|
let currentData = this.parent.currentViewData.filter(function (e) {
|
|
28389
28406
|
return e[uniqueTaskID] === ganttData[i][uniqueTaskID];
|
|
28390
28407
|
})[0];
|
|
28391
|
-
if (currentData.index > draggedRecord.index) {
|
|
28408
|
+
if (currentData && currentData.index > draggedRecord.index) {
|
|
28392
28409
|
endIndex = currentData.index;
|
|
28393
28410
|
break;
|
|
28394
28411
|
}
|