@syncfusion/ej2-gantt 21.2.4 → 21.2.6
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 +23 -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 +28 -9
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +28 -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 +16 -16
- package/src/gantt/actions/dependency.js +3 -0
- package/src/gantt/actions/edit.js +2 -3
- package/src/gantt/actions/keyboard.js +4 -1
- package/src/gantt/actions/taskbar-edit.js +3 -0
- package/src/gantt/base/gantt-chart.js +4 -1
- package/src/gantt/base/gantt.js +3 -0
- package/src/gantt/base/splitter.js +3 -0
- package/src/gantt/base/task-processor.js +1 -1
- package/src/gantt/renderer/nonworking-day.js +1 -1
- package/src/gantt/renderer/timeline.js +4 -2
|
@@ -1716,7 +1716,7 @@ class TaskProcessor extends DateProcessor {
|
|
|
1716
1716
|
constructResourceViewDataSource(resources, data, unassignedTasks) {
|
|
1717
1717
|
for (let i = 0; i < data.length; i++) {
|
|
1718
1718
|
const tempData = data[i];
|
|
1719
|
-
const child = this.parent.taskFields.child != null ? this.parent.taskFields.child : 'Children';
|
|
1719
|
+
const child = this.parent.taskFields.child != null ? this.parent.taskFields.child : this.parent.taskFields.child = 'Children';
|
|
1720
1720
|
const resourceData = tempData && tempData[this.parent.taskFields.resourceInfo];
|
|
1721
1721
|
const resourceIdMapping = this.parent.resourceFields.id;
|
|
1722
1722
|
if ((!tempData[child] || tempData[child].length === 0) && resourceData && resourceData.length) {
|
|
@@ -4612,7 +4612,10 @@ class GanttChart {
|
|
|
4612
4612
|
setVirtualHeight() {
|
|
4613
4613
|
if (this.parent.virtualScrollModule && this.parent.enableVirtualization) {
|
|
4614
4614
|
const wrapper = getValue('virtualTrack', this.parent.ganttChartModule.virtualRender);
|
|
4615
|
-
wrapper.style.height = this.parent.
|
|
4615
|
+
wrapper.style.height = this.parent.treeGrid.element.getElementsByClassName('e-virtualtable')[0].style.height;
|
|
4616
|
+
const wrapper1 = getValue('wrapper', this.parent.ganttChartModule.virtualRender);
|
|
4617
|
+
const treegridVirtualHeight = this.parent.treeGrid.element.getElementsByClassName('e-virtualtable')[0].style.transform;
|
|
4618
|
+
wrapper1.style.transform = treegridVirtualHeight;
|
|
4616
4619
|
}
|
|
4617
4620
|
}
|
|
4618
4621
|
/**
|
|
@@ -5768,6 +5771,7 @@ class Timeline {
|
|
|
5768
5771
|
if (isZoomIn) {
|
|
5769
5772
|
if (currentLevel === this.parent.zoomingLevels[this.parent.zoomingLevels.length - 1].level) {
|
|
5770
5773
|
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomin'], false); // disable toolbar items.
|
|
5774
|
+
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomout'], true);
|
|
5771
5775
|
}
|
|
5772
5776
|
else {
|
|
5773
5777
|
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomout'], true); // disable toolbar items.
|
|
@@ -5776,6 +5780,7 @@ class Timeline {
|
|
|
5776
5780
|
else {
|
|
5777
5781
|
if (currentLevel === this.parent.zoomingLevels[0].level) {
|
|
5778
5782
|
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomout'], false); // disable toolbar items.
|
|
5783
|
+
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomin'], true);
|
|
5779
5784
|
}
|
|
5780
5785
|
else {
|
|
5781
5786
|
this.parent.toolbarModule.enableItems([this.parent.controlId + '_zoomin'], true); // enable toolbar items.
|
|
@@ -6114,10 +6119,10 @@ class Timeline {
|
|
|
6114
6119
|
}
|
|
6115
6120
|
const sortedUnitLevels = sameUnitLevels.sort((a, b) => {
|
|
6116
6121
|
if (tier === "bottomTier") {
|
|
6117
|
-
return (a.bottomTier.count < b.bottomTier.count) ? 1 : -1;
|
|
6122
|
+
return (!a.bottomTier.count || !b.bottomTier.count) ? 0 : ((a.bottomTier.count < b.bottomTier.count) ? 1 : -1);
|
|
6118
6123
|
}
|
|
6119
6124
|
else {
|
|
6120
|
-
return (a.topTier.count < b.topTier.count) ? 1 : -1;
|
|
6125
|
+
return (!a.topTier.count || !b.topTier.count) ? 0 : ((a.topTier.count < b.topTier.count) ? 1 : -1);
|
|
6121
6126
|
}
|
|
6122
6127
|
});
|
|
6123
6128
|
for (let i = 0; i < sortedUnitLevels.length; i++) {
|
|
@@ -11432,6 +11437,9 @@ class Dependency {
|
|
|
11432
11437
|
if ((predecessorLength && predecessorNames !== predecessorLength)) {
|
|
11433
11438
|
validUpdate = true;
|
|
11434
11439
|
}
|
|
11440
|
+
else if (record.hasChildRecords && record.ganttProperties.predecessor.length > 0 && ganttProp.hasChildRecords && !ganttProp.ganttProperties.predecessor) {
|
|
11441
|
+
validUpdate = true;
|
|
11442
|
+
}
|
|
11435
11443
|
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
11436
11444
|
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
11437
11445
|
this.parent.editModule['updateChildItems'](record);
|
|
@@ -12569,6 +12577,9 @@ class Splitter$1 {
|
|
|
12569
12577
|
this.parent.trigger('splitterResizing', args);
|
|
12570
12578
|
},
|
|
12571
12579
|
resizeStop: (args) => {
|
|
12580
|
+
const leftPane = args.pane[0];
|
|
12581
|
+
this.splitterPreviousPositionGrid = leftPane.scrollWidth + 1 + 'px';
|
|
12582
|
+
this.splitterObject.paneSettings[0].size = this.getSpliterPositionInPercentage(this.splitterPreviousPositionGrid);
|
|
12572
12583
|
const callBackPromise = new Deferred();
|
|
12573
12584
|
this.parent.trigger('splitterResized', args, (splitterResizedArgs) => {
|
|
12574
12585
|
if (splitterResizedArgs.cancel === true) {
|
|
@@ -13333,7 +13344,10 @@ class FocusModule {
|
|
|
13333
13344
|
break;
|
|
13334
13345
|
case 'addRow':
|
|
13335
13346
|
{
|
|
13336
|
-
if (
|
|
13347
|
+
if (ganttObj.editModule && ganttObj.editModule.cellEditModule && ganttObj.editModule.cellEditModule.isCellEdit) {
|
|
13348
|
+
e.stopPropagation();
|
|
13349
|
+
}
|
|
13350
|
+
else if (isNullOrUndefined(document.getElementById(this.parent.element.id + '_dialog'))) {
|
|
13337
13351
|
e.preventDefault();
|
|
13338
13352
|
ganttObj.addRecord(undefined, this.parent.editSettings.newRowPosition);
|
|
13339
13353
|
const focussedElement = ganttObj.element;
|
|
@@ -13855,6 +13869,9 @@ let Gantt = class Gantt extends Component {
|
|
|
13855
13869
|
const ganttHeader = this.chartPane.childNodes[0].childNodes[0];
|
|
13856
13870
|
this.scrollLeftValue = this.chartPane.childNodes[0].childNodes[0]['scrollLeft'];
|
|
13857
13871
|
const ganttContent = this.chartPane.childNodes[0].childNodes[1];
|
|
13872
|
+
if (this.treeGrid.element) {
|
|
13873
|
+
this.ganttChartModule['setVirtualHeight']();
|
|
13874
|
+
}
|
|
13858
13875
|
if (!this.contentMaskTable) {
|
|
13859
13876
|
if (ganttContent) {
|
|
13860
13877
|
let content$$1 = ganttContent;
|
|
@@ -19656,6 +19673,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19656
19673
|
if ((this.taskBarEditAction === 'ConnectorPointLeftDrag' ||
|
|
19657
19674
|
this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor) {
|
|
19658
19675
|
this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
|
|
19676
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
19677
|
+
this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
|
|
19678
|
+
}
|
|
19659
19679
|
}
|
|
19660
19680
|
else {
|
|
19661
19681
|
if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
|
|
@@ -24096,9 +24116,8 @@ class Edit$2 {
|
|
|
24096
24116
|
(isNullOrUndefined(taskData.startDate) && !isNullOrUndefined(prevStart)) ||
|
|
24097
24117
|
(isNullOrUndefined(taskData.endDate) && !isNullOrUndefined(prevEnd)) ||
|
|
24098
24118
|
(prevStart && prevStart.getTime() !== taskData.startDate.getTime())
|
|
24099
|
-
|
|
24100
|
-
|| (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration
|
|
24101
|
-
|| (!isNullOrUndefined(prevDuration) && prevDuration === taskData.duration &&
|
|
24119
|
+
&& (prevEnd && prevEnd.getTime() !== taskData.endDate.getTime())
|
|
24120
|
+
|| (!isNullOrUndefined(prevDuration) && prevDuration !== taskData.duration &&
|
|
24102
24121
|
prevDurationUnit !== taskData.durationUnit)) {
|
|
24103
24122
|
isMoved = true;
|
|
24104
24123
|
}
|
|
@@ -28983,7 +29002,7 @@ class NonWorkingDay {
|
|
|
28983
29002
|
}
|
|
28984
29003
|
updateHolidayLabelHeight() {
|
|
28985
29004
|
const height = this.parent.getContentHeight();
|
|
28986
|
-
let gantttable =
|
|
29005
|
+
let gantttable = this.parent.element;
|
|
28987
29006
|
// eslint-disable-next-line
|
|
28988
29007
|
let toolbarHeight = 0;
|
|
28989
29008
|
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|