@syncfusion/ej2-gantt 19.4.41 → 19.4.42
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 +9 -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 +18 -4
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +18 -4
- 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 +13 -13
- package/src/gantt/actions/keyboard.js +4 -0
- package/src/gantt/base/date-processor.js +8 -1
- package/src/gantt/base/gantt-chart.js +0 -2
- package/src/gantt/base/task-processor.js +6 -1
|
@@ -482,7 +482,14 @@ class DateProcessor {
|
|
|
482
482
|
tDuration = this.parent.editModule.taskbarEditModule.sumOfDuration(ganttProperties.segments);
|
|
483
483
|
}
|
|
484
484
|
else {
|
|
485
|
-
|
|
485
|
+
// eslint-disable-next-line
|
|
486
|
+
if (!isNullOrUndefined(ganttProperties.startDate) && !isNullOrUndefined(ganttProperties.endDate) &&
|
|
487
|
+
(ganttProperties.startDate).getTime() === (ganttProperties.endDate).getTime() && !isNullOrUndefined(ganttData.taskData[this.parent.taskFields.milestone])) {
|
|
488
|
+
tDuration = 1;
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
tDuration = this.getDuration(ganttProperties.startDate, ganttProperties.endDate, ganttProperties.durationUnit, ganttProperties.isAutoSchedule, ganttProperties.isMilestone);
|
|
492
|
+
}
|
|
486
493
|
}
|
|
487
494
|
this.parent.setRecordValue('duration', tDuration, ganttProperties, true);
|
|
488
495
|
const col = this.parent.columnByField[this.parent.columnMapping.duration];
|
|
@@ -2589,7 +2596,12 @@ class TaskProcessor extends DateProcessor {
|
|
|
2589
2596
|
eDate.setHours(0, 0, 0, 0);
|
|
2590
2597
|
}
|
|
2591
2598
|
}
|
|
2592
|
-
|
|
2599
|
+
if ((sDate).getTime() === (eDate).getTime()) {
|
|
2600
|
+
return (this.parent.perDayWidth);
|
|
2601
|
+
}
|
|
2602
|
+
else {
|
|
2603
|
+
return ((this.getTimeDifference(sDate, eDate) / (1000 * 60 * 60 * 24)) * this.parent.perDayWidth);
|
|
2604
|
+
}
|
|
2593
2605
|
}
|
|
2594
2606
|
/**
|
|
2595
2607
|
* Get task left value
|
|
@@ -4827,8 +4839,6 @@ class GanttChart {
|
|
|
4827
4839
|
this.parent.treeGrid.collapseAll();
|
|
4828
4840
|
}
|
|
4829
4841
|
this.isExpandAll = false;
|
|
4830
|
-
const focussedElement = this.parent.element.querySelector('.e-treegrid');
|
|
4831
|
-
focussedElement.focus();
|
|
4832
4842
|
}
|
|
4833
4843
|
/**
|
|
4834
4844
|
* Public method to expand particular level of rows.
|
|
@@ -11725,6 +11735,10 @@ class FocusModule {
|
|
|
11725
11735
|
onKeyPress(e) {
|
|
11726
11736
|
const ganttObj = this.parent;
|
|
11727
11737
|
const expandedRecords = ganttObj.getExpandedRecords(ganttObj.currentViewData);
|
|
11738
|
+
if (isNullOrUndefined(this.parent.focusModule.getActiveElement()) && (e.action === 'expandAll' || e.action === 'collapseAll')) {
|
|
11739
|
+
const focussedElement = this.parent.element.querySelector('.e-treegrid');
|
|
11740
|
+
focussedElement.focus();
|
|
11741
|
+
}
|
|
11728
11742
|
const targetElement = this.parent.focusModule.getActiveElement();
|
|
11729
11743
|
if (e.action === 'home' || e.action === 'end' || e.action === 'downArrow' || e.action === 'upArrow' || e.action === 'delete' ||
|
|
11730
11744
|
e.action === 'rightArrow' || e.action === 'leftArrow' || e.action === 'focusTask' || e.action === 'focusSearch' ||
|