@syncfusion/ej2-gantt 22.1.36 → 22.1.37
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 +11 -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 +46 -20
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +46 -20
- 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 +11 -11
- package/src/gantt/actions/taskbar-edit.js +1 -0
- package/src/gantt/base/date-processor.js +1 -0
- package/src/gantt/base/gantt.d.ts +1 -0
- package/src/gantt/base/task-processor.js +41 -20
- package/src/gantt/renderer/timeline.js +3 -0
|
@@ -1528,6 +1528,7 @@ class DateProcessor {
|
|
|
1528
1528
|
setValue('minStartDate', minStartDate, editArgs);
|
|
1529
1529
|
setValue('maxEndDate', maxEndDate, editArgs);
|
|
1530
1530
|
}
|
|
1531
|
+
this.parent['isProjectDateUpdated'] = true;
|
|
1531
1532
|
}
|
|
1532
1533
|
/**
|
|
1533
1534
|
*
|
|
@@ -2070,7 +2071,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
2070
2071
|
endDate = this.getEndDate(startDate, duration, data.ganttProperties.durationUnit, data.ganttProperties, false);
|
|
2071
2072
|
}
|
|
2072
2073
|
else if (!taskSettings.duration && taskSettings.endDate) {
|
|
2073
|
-
endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime()
|
|
2074
|
+
endDate = (!isNullOrUndefined(data.ganttProperties.endDate)) && endDate.getTime() <
|
|
2074
2075
|
data.ganttProperties.endDate.getTime() && i !== segments.length - 1 ? endDate : data.ganttProperties.endDate;
|
|
2075
2076
|
duration = this.getDuration(startDate, endDate, data.ganttProperties.durationUnit, data.ganttProperties.isAutoSchedule, data.ganttProperties.isMilestone);
|
|
2076
2077
|
if (ganttSegments.length > 0 && endDate.getTime() < startDate.getTime()
|
|
@@ -2713,38 +2714,59 @@ class TaskProcessor extends DateProcessor {
|
|
|
2713
2714
|
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 60 * 1000);
|
|
2714
2715
|
}
|
|
2715
2716
|
if (ganttData && ganttData.durationUnit == 'minute') {
|
|
2716
|
-
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 *
|
|
2717
|
+
modifiedsDate = new Date(modifiedsDate.getTime() + ganttData.duration * 60 * 1000);
|
|
2717
2718
|
}
|
|
2718
2719
|
for (let i = 0; i < this.parent.dayWorkingTime.length; i++) {
|
|
2719
2720
|
hour = hour + this.parent.dayWorkingTime[i].to - this.parent.dayWorkingTime[i].from;
|
|
2720
2721
|
}
|
|
2721
2722
|
let dateDiff = modifiedsDate.getTime() - sDate.getTime();
|
|
2722
|
-
if (
|
|
2723
|
-
if (
|
|
2724
|
-
|
|
2723
|
+
if (ganttData && ganttData.durationUnit == 'minute' && ganttData.duration < (hour * 60)) {
|
|
2724
|
+
if (tierMode === 'Day') {
|
|
2725
|
+
if ((Math.floor((dateDiff / (1000 * 60 * 60)) % 24) >= hour || dateDiff === 0)) {
|
|
2726
|
+
isValid = true;
|
|
2727
|
+
}
|
|
2728
|
+
if (this.getSecondsInDecimal(sDate) === this.parent.defaultStartTime && isValid) {
|
|
2729
|
+
sDate.setHours(0, 0, 0, 0);
|
|
2730
|
+
}
|
|
2731
|
+
if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
|
|
2732
|
+
eDate.setHours(24);
|
|
2733
|
+
}
|
|
2734
|
+
if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
|
|
2735
|
+
eDate.setHours(0, 0, 0, 0);
|
|
2736
|
+
}
|
|
2725
2737
|
}
|
|
2726
|
-
|
|
2727
|
-
|
|
2738
|
+
else {
|
|
2739
|
+
isValid = true;
|
|
2728
2740
|
}
|
|
2729
|
-
if (
|
|
2730
|
-
|
|
2741
|
+
if ((sDate).getTime() === (eDate).getTime()) {
|
|
2742
|
+
return (this.parent.perDayWidth);
|
|
2731
2743
|
}
|
|
2732
|
-
|
|
2733
|
-
|
|
2744
|
+
else {
|
|
2745
|
+
if (isValid) {
|
|
2746
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
2747
|
+
}
|
|
2748
|
+
else {
|
|
2749
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * hour)) * this.parent.perDayWidth);
|
|
2750
|
+
}
|
|
2734
2751
|
}
|
|
2735
2752
|
}
|
|
2736
2753
|
else {
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2754
|
+
if (tierMode === 'Day') {
|
|
2755
|
+
if (this.getSecondsInDecimal(sDate) === this.parent.defaultStartTime) {
|
|
2756
|
+
sDate.setHours(0, 0, 0, 0);
|
|
2757
|
+
}
|
|
2758
|
+
if (this.getSecondsInDecimal(eDate) === this.parent.defaultEndTime) {
|
|
2759
|
+
eDate.setHours(24);
|
|
2760
|
+
}
|
|
2761
|
+
if (this.getSecondsInDecimal(eDate) === this.parent.defaultStartTime) {
|
|
2762
|
+
eDate.setHours(0, 0, 0, 0);
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2765
|
+
if ((sDate).getTime() === (eDate).getTime()) {
|
|
2766
|
+
return (this.parent.perDayWidth);
|
|
2745
2767
|
}
|
|
2746
2768
|
else {
|
|
2747
|
-
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 *
|
|
2769
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
2748
2770
|
}
|
|
2749
2771
|
}
|
|
2750
2772
|
}
|
|
@@ -5894,6 +5916,9 @@ class Timeline {
|
|
|
5894
5916
|
*/
|
|
5895
5917
|
processZooming(isZoomIn) {
|
|
5896
5918
|
this.isZoomToFit = false;
|
|
5919
|
+
if (!this.parent['isProjectDateUpdated']) {
|
|
5920
|
+
this.parent.dateValidationModule.calculateProjectDates();
|
|
5921
|
+
}
|
|
5897
5922
|
if (!isNullOrUndefined(this.parent.zoomingProjectStartDate)) {
|
|
5898
5923
|
this.parent.cloneProjectStartDate = this.parent.cloneProjectStartDate.getTime() < this.parent.zoomingProjectStartDate.getTime()
|
|
5899
5924
|
? this.parent.cloneProjectStartDate : this.parent.zoomingProjectStartDate;
|
|
@@ -19835,6 +19860,7 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19835
19860
|
}
|
|
19836
19861
|
}
|
|
19837
19862
|
}
|
|
19863
|
+
this.parent['isProjectDateUpdated'] = false;
|
|
19838
19864
|
}
|
|
19839
19865
|
/**
|
|
19840
19866
|
* To cancel the taskbar edt action.
|