@syncfusion/ej2-gantt 21.2.3 → 21.2.5
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 +25 -1
- 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 +37 -10
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +37 -10
- 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 +19 -16
- package/src/gantt/actions/dependency.js +3 -0
- package/src/gantt/actions/dialog-edit.js +1 -1
- package/src/gantt/actions/edit.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 +1 -1
- package/src/gantt/base/splitter.js +3 -0
- package/src/gantt/renderer/chart-rows.js +12 -2
- package/src/gantt/renderer/nonworking-day.js +1 -1
- package/src/gantt/renderer/timeline.js +5 -3
|
@@ -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.
|
|
@@ -5879,7 +5884,7 @@ class Timeline {
|
|
|
5879
5884
|
let firstValue;
|
|
5880
5885
|
let secondValue;
|
|
5881
5886
|
const zoomingCollections = [...this.parent.zoomingLevels];
|
|
5882
|
-
const sortedCollectons = zoomingCollections.sort((a, b) => (a.perDayWidth < b.perDayWidth) ? 1 : -1);
|
|
5887
|
+
const sortedCollectons = zoomingCollections.sort((a, b) => (!a.perDayWidth && !b.perDayWidth ? 0 : (a.perDayWidth < b.perDayWidth) ? 1 : -1));
|
|
5883
5888
|
if (perDayWidth === 0) { // return when the Gantt chart is not in viewable state.
|
|
5884
5889
|
return;
|
|
5885
5890
|
}
|
|
@@ -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++) {
|
|
@@ -8776,7 +8781,12 @@ class ChartRows extends DateProcessor {
|
|
|
8776
8781
|
data.ganttProperties.segments.length === 0))) {
|
|
8777
8782
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
8778
8783
|
let templateElement = this.createDivElement(template)[0];
|
|
8779
|
-
|
|
8784
|
+
if (this.parent.disableHtmlEncode) {
|
|
8785
|
+
templateElement.innerText = labelString;
|
|
8786
|
+
}
|
|
8787
|
+
else {
|
|
8788
|
+
templateElement.innerHTML = labelString;
|
|
8789
|
+
}
|
|
8780
8790
|
let childLabel = this.parent.labelSettings.taskLabel;
|
|
8781
8791
|
if (childLabel && childLabel['elementRef'])
|
|
8782
8792
|
templateElement.appendChild(tempDiv);
|
|
@@ -9442,7 +9452,12 @@ class ChartRows extends DateProcessor {
|
|
|
9442
9452
|
this.taskBarHeight + 'px;"></span>';
|
|
9443
9453
|
}
|
|
9444
9454
|
let labelElement = this.createDivElement(labelDiv)[0];
|
|
9445
|
-
|
|
9455
|
+
if (this.parent.disableHtmlEncode) {
|
|
9456
|
+
labelElement.innerText = labelString;
|
|
9457
|
+
}
|
|
9458
|
+
else {
|
|
9459
|
+
labelElement.innerHTML = labelString;
|
|
9460
|
+
}
|
|
9446
9461
|
let parentLabel = this.parent.labelSettings.taskLabel;
|
|
9447
9462
|
if (parentLabel && parentLabel['elementRef'])
|
|
9448
9463
|
labelElement.appendChild(div);
|
|
@@ -11422,6 +11437,9 @@ class Dependency {
|
|
|
11422
11437
|
if ((predecessorLength && predecessorNames !== predecessorLength)) {
|
|
11423
11438
|
validUpdate = true;
|
|
11424
11439
|
}
|
|
11440
|
+
else if (record.hasChildRecords && record.ganttProperties.predecessor.length > 0 && ganttProp.hasChildRecords && !ganttProp.ganttProperties.predecessor) {
|
|
11441
|
+
validUpdate = true;
|
|
11442
|
+
}
|
|
11425
11443
|
if ((taskBarModule.taskBarEditAction !== 'ParentDrag' && taskBarModule.taskBarEditAction !== 'ChildDrag')) {
|
|
11426
11444
|
if (!ganttProp.hasChildRecords && record.hasChildRecords) {
|
|
11427
11445
|
this.parent.editModule['updateChildItems'](record);
|
|
@@ -12559,6 +12577,9 @@ class Splitter$1 {
|
|
|
12559
12577
|
this.parent.trigger('splitterResizing', args);
|
|
12560
12578
|
},
|
|
12561
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);
|
|
12562
12583
|
const callBackPromise = new Deferred();
|
|
12563
12584
|
this.parent.trigger('splitterResized', args, (splitterResizedArgs) => {
|
|
12564
12585
|
if (splitterResizedArgs.cancel === true) {
|
|
@@ -15124,7 +15145,7 @@ let Gantt = class Gantt extends Component {
|
|
|
15124
15145
|
args: [this]
|
|
15125
15146
|
});
|
|
15126
15147
|
}
|
|
15127
|
-
if (this.toolbar) {
|
|
15148
|
+
if (this.toolbar && this.toolbar.length > 0) {
|
|
15128
15149
|
modules.push({
|
|
15129
15150
|
member: 'toolbar',
|
|
15130
15151
|
args: [this]
|
|
@@ -19646,6 +19667,9 @@ class TaskbarEdit extends DateProcessor {
|
|
|
19646
19667
|
if ((this.taskBarEditAction === 'ConnectorPointLeftDrag' ||
|
|
19647
19668
|
this.taskBarEditAction === 'ConnectorPointRightDrag') && this.drawPredecessor) {
|
|
19648
19669
|
this.parent.connectorLineEditModule.updatePredecessor(this.connectorSecondRecord, this.finalPredecessor);
|
|
19670
|
+
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
19671
|
+
this.parent.connectorLineEditModule['calculateOffset'](this.connectorSecondRecord);
|
|
19672
|
+
}
|
|
19649
19673
|
}
|
|
19650
19674
|
else {
|
|
19651
19675
|
if (x1 !== x2 || (Math.abs(y1 - resMouseY) >= (this.parent.rowHeight - this.parent.taskbarHeight) / 2)) {
|
|
@@ -22445,7 +22469,7 @@ class DialogEdit {
|
|
|
22445
22469
|
const ganttObj = this.parent;
|
|
22446
22470
|
const rte = notesElement.ej2_instances[0];
|
|
22447
22471
|
if (this.isEdit) {
|
|
22448
|
-
if (ganttObj.columnByField[ganttObj.taskFields.notes].disableHtmlEncode) {
|
|
22472
|
+
if (ganttObj.columnByField[ganttObj.taskFields.notes].disableHtmlEncode === false) {
|
|
22449
22473
|
this.parent.setRecordValue('notes', rte.getHtml(), this.rowData.ganttProperties, true);
|
|
22450
22474
|
}
|
|
22451
22475
|
else {
|
|
@@ -23860,7 +23884,7 @@ class Edit$2 {
|
|
|
23860
23884
|
}
|
|
23861
23885
|
else if ([tasks.progress, tasks.notes, tasks.durationUnit, tasks.expandState,
|
|
23862
23886
|
tasks.milestone, tasks.name, tasks.baselineStartDate,
|
|
23863
|
-
tasks.baselineEndDate, tasks.id, tasks.segments].indexOf(key) !== -1) {
|
|
23887
|
+
tasks.baselineEndDate, tasks.id, tasks.segments, tasks.cssClass].indexOf(key) !== -1) {
|
|
23864
23888
|
const column = ganttObj.columnByField[key];
|
|
23865
23889
|
/* eslint-disable-next-line */
|
|
23866
23890
|
let value = data[key];
|
|
@@ -23874,6 +23898,9 @@ class Edit$2 {
|
|
|
23874
23898
|
else if (key === tasks.name) {
|
|
23875
23899
|
ganttPropKey = 'taskName';
|
|
23876
23900
|
}
|
|
23901
|
+
else if (key === tasks.cssClass) {
|
|
23902
|
+
ganttPropKey = 'cssClass';
|
|
23903
|
+
}
|
|
23877
23904
|
else if ((key === tasks.segments) && (!isNullOrUndefined(ganttData.ganttProperties.segments))) {
|
|
23878
23905
|
ganttPropKey = 'segments';
|
|
23879
23906
|
/* eslint-disable-next-line */
|
|
@@ -28970,7 +28997,7 @@ class NonWorkingDay {
|
|
|
28970
28997
|
}
|
|
28971
28998
|
updateHolidayLabelHeight() {
|
|
28972
28999
|
const height = this.parent.getContentHeight();
|
|
28973
|
-
let gantttable =
|
|
29000
|
+
let gantttable = this.parent.element;
|
|
28974
29001
|
// eslint-disable-next-line
|
|
28975
29002
|
let toolbarHeight = 0;
|
|
28976
29003
|
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|