@syncfusion/ej2-gantt 24.2.3 → 24.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 +22 -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 +83 -21
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +84 -21
- 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/connector-line-edit.d.ts +1 -0
- package/src/gantt/actions/connector-line-edit.js +24 -0
- package/src/gantt/actions/dialog-edit.d.ts +1 -0
- package/src/gantt/actions/dialog-edit.js +4 -1
- package/src/gantt/base/gantt-chart.js +34 -14
- package/src/gantt/base/gantt.js +0 -3
- package/src/gantt/export/pdf-base/pdf-grid-table.js +20 -3
- package/src/gantt/renderer/timeline.js +2 -0
|
@@ -5204,7 +5204,7 @@ class GanttChart {
|
|
|
5204
5204
|
*/
|
|
5205
5205
|
ganttChartMove(e) {
|
|
5206
5206
|
if (this.parent.editSettings.allowTaskbarEditing) {
|
|
5207
|
-
if (this.parent.element.getElementsByClassName('e-clone-taskbar').length > 0) {
|
|
5207
|
+
if (this.parent.element.getElementsByClassName('e-clone-taskbar').length > 0 && !this.parent.enableRtl) {
|
|
5208
5208
|
let xValue;
|
|
5209
5209
|
if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
|
|
5210
5210
|
xValue = e['changedTouches'][0].pageX;
|
|
@@ -5684,21 +5684,39 @@ class GanttChart {
|
|
|
5684
5684
|
const mouseUp = Browser.touchEndEvent;
|
|
5685
5685
|
const mouseMove = Browser.touchMoveEvent;
|
|
5686
5686
|
const cancel = isIE11Pointer ? 'pointerleave' : 'mouseleave';
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5687
|
+
if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody)) {
|
|
5688
|
+
EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, mouseDown, this.ganttChartMouseDown);
|
|
5689
|
+
}
|
|
5690
|
+
if (!isNullOrUndefined(this.parent.chartPane)) {
|
|
5691
|
+
EventHandler.remove(this.parent.chartPane, cancel, this.ganttChartLeave);
|
|
5692
|
+
EventHandler.remove(this.parent.chartPane, mouseMove, this.ganttChartMove);
|
|
5693
|
+
}
|
|
5690
5694
|
if (this.parent.isAdaptive) {
|
|
5691
|
-
|
|
5692
|
-
|
|
5695
|
+
if (!isNullOrUndefined(this.parent.chartPane)) {
|
|
5696
|
+
EventHandler.remove(this.parent.chartPane, click, this.ganttChartMouseClick);
|
|
5697
|
+
EventHandler.remove(this.parent.chartPane, mouseUp, this.ganttChartMouseUp);
|
|
5698
|
+
}
|
|
5693
5699
|
}
|
|
5694
5700
|
if (!this.parent.isAdaptive) {
|
|
5695
|
-
|
|
5696
|
-
|
|
5701
|
+
if (!isNullOrUndefined(this.parent.element)) {
|
|
5702
|
+
EventHandler.remove(this.parent.element, mouseUp, this.documentMouseUp);
|
|
5703
|
+
}
|
|
5704
|
+
if (!isNullOrUndefined(document)) {
|
|
5705
|
+
EventHandler.remove(document, mouseUp, this.mouseUp);
|
|
5706
|
+
}
|
|
5707
|
+
}
|
|
5708
|
+
if (!isNullOrUndefined(this.parent.element)) {
|
|
5709
|
+
EventHandler.remove(this.parent.element, 'mousemove', this.mouseMoveHandler);
|
|
5710
|
+
}
|
|
5711
|
+
if (!isNullOrUndefined(document)) {
|
|
5712
|
+
EventHandler.remove(document, 'mouseup', this.contextClick);
|
|
5713
|
+
if (!isNullOrUndefined(document.body)) {
|
|
5714
|
+
EventHandler.remove(document.body, 'contextmenu', this.contextClick);
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5717
|
+
if (!isNullOrUndefined(this.parent.chartRowsModule.ganttChartTableBody)) {
|
|
5718
|
+
EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, 'dblclick', this.doubleClickHandler);
|
|
5697
5719
|
}
|
|
5698
|
-
EventHandler.remove(this.parent.element, 'mousemove', this.mouseMoveHandler);
|
|
5699
|
-
EventHandler.remove(document.body, 'contextmenu', this.contextClick);
|
|
5700
|
-
EventHandler.remove(document, 'mouseup', this.contextClick);
|
|
5701
|
-
EventHandler.remove(this.parent.chartRowsModule.ganttChartTableBody, 'dblclick', this.doubleClickHandler);
|
|
5702
5720
|
}
|
|
5703
5721
|
/**
|
|
5704
5722
|
* To get record by taskbar element.
|
|
@@ -6187,8 +6205,10 @@ class GanttChart {
|
|
|
6187
6205
|
destroy() {
|
|
6188
6206
|
this.removeEventListener();
|
|
6189
6207
|
this.unWireEvents();
|
|
6190
|
-
this.scrollObject
|
|
6191
|
-
|
|
6208
|
+
if (!isNullOrUndefined(this.scrollObject)) {
|
|
6209
|
+
this.scrollObject.destroy();
|
|
6210
|
+
this.scrollObject = null;
|
|
6211
|
+
}
|
|
6192
6212
|
}
|
|
6193
6213
|
}
|
|
6194
6214
|
|
|
@@ -6276,6 +6296,8 @@ class Timeline {
|
|
|
6276
6296
|
*/
|
|
6277
6297
|
updateChartByNewTimeline() {
|
|
6278
6298
|
this.parent.chartRowsModule.refreshChartByTimeline();
|
|
6299
|
+
let currentScrollLeft = this.parent.element.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollLeft;
|
|
6300
|
+
this.parent.element.getElementsByClassName('e-timeline-header-container')[0].scrollLeft = currentScrollLeft;
|
|
6279
6301
|
this.parent.notify('refreshDayMarkers', {});
|
|
6280
6302
|
}
|
|
6281
6303
|
/**
|
|
@@ -14632,9 +14654,6 @@ let Gantt = class Gantt extends Component {
|
|
|
14632
14654
|
if (isNullOrUndefined(this.resourceFields.unit)) { //set resourceUnit as unit if not mapping
|
|
14633
14655
|
this.setProperties({ resourceFields: { unit: 'unit' } }, true);
|
|
14634
14656
|
}
|
|
14635
|
-
if (!isNullOrUndefined(this.taskFields.work)) {
|
|
14636
|
-
this.setProperties({ taskType: 'FixedWork' }, true);
|
|
14637
|
-
}
|
|
14638
14657
|
this.taskIds = [];
|
|
14639
14658
|
}
|
|
14640
14659
|
/**
|
|
@@ -23626,6 +23645,9 @@ class DialogEdit {
|
|
|
23626
23645
|
createDivElement(className, id) {
|
|
23627
23646
|
return createElement('div', { className: className, id: id });
|
|
23628
23647
|
}
|
|
23648
|
+
createFormElement(className, id) {
|
|
23649
|
+
return createElement('form', { className: className, id: id });
|
|
23650
|
+
}
|
|
23629
23651
|
createInputElement(className, id, fieldName, type) {
|
|
23630
23652
|
return createElement(type || 'input', {
|
|
23631
23653
|
className: className, attrs: {
|
|
@@ -23740,7 +23762,7 @@ class DialogEdit {
|
|
|
23740
23762
|
renderGeneralTab(itemName) {
|
|
23741
23763
|
const ganttObj = this.parent;
|
|
23742
23764
|
const itemModel = this.beforeOpenArgs[itemName];
|
|
23743
|
-
const divElement = this.
|
|
23765
|
+
const divElement = this.createFormElement('e-edit-form-row', ganttObj.element.id
|
|
23744
23766
|
+ '' + itemName + 'TabContainer');
|
|
23745
23767
|
for (const key of Object.keys(itemModel)) {
|
|
23746
23768
|
if (this.parent.columnByField[key].visible === false) {
|
|
@@ -25155,10 +25177,33 @@ class ConnectorLineEdit {
|
|
|
25155
25177
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
25156
25178
|
}
|
|
25157
25179
|
else if (args.validateMode.preserveLinkWithEditing) {
|
|
25180
|
+
let connectedTaskId;
|
|
25158
25181
|
if (this.parent.UpdateOffsetOnTaskbarEdit) {
|
|
25159
25182
|
this.calculateOffset(ganttRecord);
|
|
25183
|
+
let taskId = ganttRecord.ganttProperties.taskId;
|
|
25184
|
+
ganttRecord.ganttProperties.predecessor.forEach(predecessor => {
|
|
25185
|
+
if (taskId == predecessor.from) {
|
|
25186
|
+
connectedTaskId = predecessor.to;
|
|
25187
|
+
return;
|
|
25188
|
+
}
|
|
25189
|
+
});
|
|
25160
25190
|
}
|
|
25161
25191
|
this.parent.editModule.updateEditedTask(args.editEventArgs);
|
|
25192
|
+
this.processPredecessors(connectedTaskId);
|
|
25193
|
+
}
|
|
25194
|
+
}
|
|
25195
|
+
processPredecessors(parentId) {
|
|
25196
|
+
if (parentId) {
|
|
25197
|
+
const record = this.parent.getRecordByID(parentId);
|
|
25198
|
+
this.calculateOffset(record);
|
|
25199
|
+
if (record && record.ganttProperties && record.ganttProperties.predecessor) {
|
|
25200
|
+
const predecessors = record.ganttProperties.predecessor;
|
|
25201
|
+
predecessors.forEach(predecessor => {
|
|
25202
|
+
if (record.ganttProperties.taskId == predecessor.from) {
|
|
25203
|
+
this.processPredecessors(predecessor.to);
|
|
25204
|
+
}
|
|
25205
|
+
});
|
|
25206
|
+
}
|
|
25162
25207
|
}
|
|
25163
25208
|
}
|
|
25164
25209
|
checkChildRecords(ganttRecord) {
|
|
@@ -35629,6 +35674,12 @@ class PdfTreeGridCell {
|
|
|
35629
35674
|
if (typeof this.value === 'string') {
|
|
35630
35675
|
/* eslint-disable-next-line */
|
|
35631
35676
|
let font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
35677
|
+
if (this.row.isParentRow) {
|
|
35678
|
+
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, PdfFontStyle.Bold);
|
|
35679
|
+
}
|
|
35680
|
+
else {
|
|
35681
|
+
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
35682
|
+
}
|
|
35632
35683
|
if (this.row.treegrid.ganttStyle.font) {
|
|
35633
35684
|
font = this.row.treegrid.ganttStyle.font;
|
|
35634
35685
|
}
|
|
@@ -35664,13 +35715,24 @@ class PdfTreeGridCell {
|
|
|
35664
35715
|
currentValue = !(isNullOrUndefined(this.remainingString) || this.remainingString === '') ? this.remainingString : this.value;
|
|
35665
35716
|
}
|
|
35666
35717
|
/* eslint-disable */
|
|
35667
|
-
let font =
|
|
35718
|
+
let font = null;
|
|
35719
|
+
if (this.row.isParentRow) {
|
|
35720
|
+
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, PdfFontStyle.Bold);
|
|
35721
|
+
}
|
|
35722
|
+
else {
|
|
35723
|
+
font = new PdfStandardFont(this.row.treegrid.ganttStyle.fontFamily, this.style.fontSize, this.style.fontStyle);
|
|
35724
|
+
}
|
|
35668
35725
|
if (this.row.treegrid.ganttStyle.font) {
|
|
35669
35726
|
font = this.row.treegrid.ganttStyle.font;
|
|
35670
35727
|
}
|
|
35671
35728
|
/* eslint-disable */
|
|
35672
35729
|
const slr = layouter.layout(currentValue, font, this.style.format, new SizeF(width, 0), false, new SizeF(0, 0));
|
|
35673
|
-
|
|
35730
|
+
if (currentValue.length > 80) {
|
|
35731
|
+
height += slr.actualSize.height + 20;
|
|
35732
|
+
}
|
|
35733
|
+
else {
|
|
35734
|
+
height += slr.actualSize.height;
|
|
35735
|
+
}
|
|
35674
35736
|
height += (this.style.borders.top.width + this.style.borders.bottom.width) * 2;
|
|
35675
35737
|
}
|
|
35676
35738
|
height += this.row.treegrid.style.cellPadding.top + this.row.treegrid.style.cellPadding.bottom;
|
|
@@ -35762,7 +35824,7 @@ class PdfTreeGridCell {
|
|
|
35762
35824
|
if (this.finishedDrawingCell) {
|
|
35763
35825
|
temp = (this.remainingString === '') ? this.remainingString : this.value;
|
|
35764
35826
|
/* eslint-disable-next-line */
|
|
35765
|
-
graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
|
|
35827
|
+
graphics.drawString(temp, font, textPen, textBrush, (innerLayoutArea.x + leftAdjustment), this.isHeaderCell ? innerLayoutArea.y - 16 : innerLayoutArea.y - 3, (innerLayoutArea.width - leftAdjustment - padding), (innerLayoutArea.height - padding), this.style.format);
|
|
35766
35828
|
}
|
|
35767
35829
|
else {
|
|
35768
35830
|
/* eslint-disable-next-line */
|