@syncfusion/ej2-gantt 23.1.41 → 23.1.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 +13 -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 +160 -123
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +160 -123
- 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 +10 -10
- package/src/gantt/actions/chart-scroll.js +6 -1
- package/src/gantt/actions/critical-path.js +1 -0
- package/src/gantt/actions/edit.js +5 -2
- package/src/gantt/actions/rowdragdrop.js +6 -6
- package/src/gantt/actions/taskbar-edit.d.ts +4 -1
- package/src/gantt/actions/taskbar-edit.js +65 -80
- package/src/gantt/base/gantt-chart.js +35 -18
- package/src/gantt/export/export-helper.js +11 -11
- package/src/gantt/renderer/chart-rows.js +26 -5
- package/src/gantt/renderer/connector-line.js +6 -1
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/gantt/_layout.scss +1 -1
- package/styles/gantt/bootstrap-dark.css +1 -1
- package/styles/gantt/bootstrap.css +1 -1
- package/styles/gantt/bootstrap4.css +1 -1
- package/styles/gantt/bootstrap5-dark.css +1 -1
- package/styles/gantt/bootstrap5.css +1 -1
- package/styles/gantt/fabric-dark.css +1 -1
- package/styles/gantt/fabric.css +1 -1
- package/styles/gantt/fluent-dark.css +1 -1
- package/styles/gantt/fluent.css +1 -1
- package/styles/gantt/highcontrast-light.css +1 -1
- package/styles/gantt/highcontrast.css +1 -1
- package/styles/gantt/material-dark.css +1 -1
- package/styles/gantt/material.css +1 -1
- package/styles/gantt/material3-dark.css +1 -1
- package/styles/gantt/material3.css +1 -1
- package/styles/gantt/tailwind-dark.css +1 -1
- package/styles/gantt/tailwind.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark.css +1 -1
- package/styles/material3.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -4329,7 +4329,12 @@ var ChartScroll = /** @__PURE__ @class */ (function () {
|
|
|
4329
4329
|
for (var i = 0; i < parent.currentViewData.length; i++) {
|
|
4330
4330
|
var tr = parent.chartRowsModule.ganttChartTableBody.childNodes[i];
|
|
4331
4331
|
if (tr['style'].display !== 'none' && parent.currentViewData[i].hasChildRecords && !parent.currentViewData[i].expanded) {
|
|
4332
|
-
parent.
|
|
4332
|
+
if (parent.ganttChartModule.isExpandAll || parent.ganttChartModule.isCollapseAll) {
|
|
4333
|
+
parent.treeGrid.getRowByIndex(i)['style'].height = tr['style'].height;
|
|
4334
|
+
}
|
|
4335
|
+
else {
|
|
4336
|
+
parent.treeGrid.getRows()[i]['style'].height = tr['style'].height;
|
|
4337
|
+
}
|
|
4333
4338
|
}
|
|
4334
4339
|
}
|
|
4335
4340
|
parent.contentHeight = parent.enableRtl ? parent['element'].getElementsByClassName('e-content')[2].children[0]['offsetHeight'] :
|
|
@@ -4830,8 +4835,14 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4830
4835
|
this.parent.notify('chartMouseDown', e);
|
|
4831
4836
|
this.parent.element.tabIndex = 0;
|
|
4832
4837
|
}
|
|
4833
|
-
|
|
4834
|
-
|
|
4838
|
+
var isTaskbarEdited = false;
|
|
4839
|
+
if (this.parent.editSettings.allowTaskbarEditing && this.parent.element.querySelector('.e-left-resize-gripper')) {
|
|
4840
|
+
isTaskbarEdited = true;
|
|
4841
|
+
}
|
|
4842
|
+
if (!isTaskbarEdited) {
|
|
4843
|
+
if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
|
|
4844
|
+
this.parent.treeGrid.endEdit();
|
|
4845
|
+
}
|
|
4835
4846
|
}
|
|
4836
4847
|
};
|
|
4837
4848
|
GanttChart.prototype.ganttChartMouseClick = function (e) {
|
|
@@ -4841,6 +4852,22 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4841
4852
|
this.parent.notify('chartMouseClick', e);
|
|
4842
4853
|
};
|
|
4843
4854
|
GanttChart.prototype.ganttChartMouseUp = function (e) {
|
|
4855
|
+
if (e.type === "touchend") {
|
|
4856
|
+
var resizeCheck = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-taskbar-resize-div');
|
|
4857
|
+
if (!isNullOrUndefined(resizeCheck)) {
|
|
4858
|
+
resizeCheck.remove();
|
|
4859
|
+
}
|
|
4860
|
+
var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar') || this.parent.chartPane.querySelector('.e-clone-taskbar');
|
|
4861
|
+
if (!isNullOrUndefined(Check)) {
|
|
4862
|
+
var clonetbody = Check.parentElement;
|
|
4863
|
+
var cloneTable = clonetbody.parentElement;
|
|
4864
|
+
cloneTable.remove();
|
|
4865
|
+
}
|
|
4866
|
+
var falseline = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-gantt-false-line');
|
|
4867
|
+
if (!isNullOrUndefined(falseline)) {
|
|
4868
|
+
this.parent.editModule.taskbarEditModule.removeFalseLine(true);
|
|
4869
|
+
}
|
|
4870
|
+
}
|
|
4844
4871
|
if (this.parent.editSettings.allowTaskbarEditing) {
|
|
4845
4872
|
this.parent.notify('chartMouseUp', e);
|
|
4846
4873
|
}
|
|
@@ -4864,22 +4891,6 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4864
4891
|
}
|
|
4865
4892
|
}
|
|
4866
4893
|
}
|
|
4867
|
-
if (e.type === "touchend") {
|
|
4868
|
-
var resizeCheck = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-taskbar-resize-div');
|
|
4869
|
-
if (!isNullOrUndefined(resizeCheck)) {
|
|
4870
|
-
resizeCheck.remove();
|
|
4871
|
-
}
|
|
4872
|
-
var Check = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-clone-taskbar');
|
|
4873
|
-
if (!isNullOrUndefined(Check)) {
|
|
4874
|
-
var clonetbody = Check.parentElement;
|
|
4875
|
-
var cloneTable = clonetbody.parentElement;
|
|
4876
|
-
cloneTable.remove();
|
|
4877
|
-
}
|
|
4878
|
-
var falseline = this.parent.ganttChartModule.chartBodyContainer.querySelector('.e-gantt-false-line');
|
|
4879
|
-
if (!isNullOrUndefined(falseline)) {
|
|
4880
|
-
this.parent.editModule.taskbarEditModule.removeFalseLine(true);
|
|
4881
|
-
}
|
|
4882
|
-
}
|
|
4883
4894
|
};
|
|
4884
4895
|
/**
|
|
4885
4896
|
*
|
|
@@ -4933,6 +4944,9 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
4933
4944
|
if (!isNullOrUndefined(resizeCheck)) {
|
|
4934
4945
|
resizeCheck.remove();
|
|
4935
4946
|
}
|
|
4947
|
+
if (this.parent.allowTaskbarDragAndDrop && this.parent.editModule && this.parent.editModule.taskbarEditModule) {
|
|
4948
|
+
this.parent.editModule.taskbarEditModule['previousLeftValue'] = 0;
|
|
4949
|
+
}
|
|
4936
4950
|
if (this.parent.allowRowDragAndDrop) {
|
|
4937
4951
|
var ganttDragElemet = this.parent.element.querySelector('.e-ganttdrag');
|
|
4938
4952
|
if (ganttDragElemet) {
|
|
@@ -5079,6 +5093,14 @@ var GanttChart = /** @__PURE__ @class */ (function () {
|
|
|
5079
5093
|
if (this.parent.allowFiltering && this.parent.filterModule) {
|
|
5080
5094
|
this.parent.filterModule.closeFilterOnContextClick(e.srcElement);
|
|
5081
5095
|
}
|
|
5096
|
+
if (this.parent.allowTaskbarDragAndDrop) {
|
|
5097
|
+
var Check = this.parent.chartPane.querySelector('.e-clone-taskbar');
|
|
5098
|
+
if (!isNullOrUndefined(Check)) {
|
|
5099
|
+
var clonetbody = Check.parentElement;
|
|
5100
|
+
var cloneTable = clonetbody.parentElement;
|
|
5101
|
+
cloneTable.remove();
|
|
5102
|
+
}
|
|
5103
|
+
}
|
|
5082
5104
|
};
|
|
5083
5105
|
/**
|
|
5084
5106
|
* Method to trigger while perform mouse move on Gantt.
|
|
@@ -11244,7 +11266,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
11244
11266
|
if (!tr) {
|
|
11245
11267
|
tr = this.ganttChartTableBody.childNodes[rowIndex];
|
|
11246
11268
|
}
|
|
11247
|
-
|
|
11269
|
+
if (this.parent.ganttChartModule.isExpandAll || this.parent.ganttChartModule.isCollapseAll) {
|
|
11270
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = this.parent.rowHeight + 'px';
|
|
11271
|
+
}
|
|
11272
|
+
else {
|
|
11273
|
+
tr['style'].height = this.parent.treeGrid.getRows()[rowIndex]['style'].height = this.parent.rowHeight + 'px';
|
|
11274
|
+
}
|
|
11248
11275
|
this.parent.contentHeight = treeGridContentHeight;
|
|
11249
11276
|
var rowIDs = [];
|
|
11250
11277
|
var rowCounts = 0;
|
|
@@ -11261,7 +11288,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
11261
11288
|
rowCounts++;
|
|
11262
11289
|
tr.children[0]['style'].verticalAlign = 'baseline';
|
|
11263
11290
|
tr.getElementsByClassName('e-taskbar-main-container')[k]['style'].marginTop = (rowCounts * this.parent.rowHeight) + this.taskBarMarginTop + 'px';
|
|
11264
|
-
|
|
11291
|
+
if (this.parent.ganttChartModule.isExpandAll || this.parent.ganttChartModule.isCollapseAll) {
|
|
11292
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(rowIndex)['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
|
|
11293
|
+
}
|
|
11294
|
+
else {
|
|
11295
|
+
tr['style'].height = this.parent.treeGrid.getRows()[rowIndex]['style'].height = parseInt(tr['style'].height) + this.parent.rowHeight + 'px';
|
|
11296
|
+
}
|
|
11265
11297
|
}
|
|
11266
11298
|
}
|
|
11267
11299
|
else {
|
|
@@ -11294,7 +11326,12 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
11294
11326
|
if (index !== -1 && selectedItem) {
|
|
11295
11327
|
var data = selectedItem;
|
|
11296
11328
|
if (!this.parent.allowTaskbarOverlap && this.parent.viewType === 'ResourceView' && data.expanded) {
|
|
11297
|
-
|
|
11329
|
+
if (this.parent.ganttChartModule.isExpandAll || this.parent.ganttChartModule.isCollapseAll) {
|
|
11330
|
+
tr['style'].height = this.parent.treeGrid.getRowByIndex(index)['style'].height = this.parent.rowHeight + 'px';
|
|
11331
|
+
}
|
|
11332
|
+
else {
|
|
11333
|
+
tr['style'].height = this.parent.treeGrid.getRows()[index]['style'].height = this.parent.rowHeight + 'px';
|
|
11334
|
+
}
|
|
11298
11335
|
}
|
|
11299
11336
|
if (this.parent.viewType === 'ResourceView' && data.hasChildRecords && !data.expanded && this.parent.enableMultiTaskbar) {
|
|
11300
11337
|
tr.replaceChild(this.getResourceParent(data).childNodes[0], tr.childNodes[0]);
|
|
@@ -11355,8 +11392,14 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
|
|
|
11355
11392
|
addClass([cloneElement], 'collpse-parent-border');
|
|
11356
11393
|
var id = tRow.querySelector('.' + taskBarMainContainer).getAttribute('rowUniqueId');
|
|
11357
11394
|
var ganttData = this.parent.getRecordByID(id);
|
|
11358
|
-
|
|
11359
|
-
|
|
11395
|
+
if (!(isNullOrUndefined(ganttData)) && ganttData.ganttProperties.segments && ganttData.ganttProperties.segments.length > 0) {
|
|
11396
|
+
var segmentedTasks = cloneElement.getElementsByClassName('e-segmented-taskbar');
|
|
11397
|
+
for (var i = 0; i < segmentedTasks.length; i++) {
|
|
11398
|
+
this.triggerQueryTaskbarInfoByIndex(segmentedTasks[i], ganttData);
|
|
11399
|
+
}
|
|
11400
|
+
}
|
|
11401
|
+
else if (this.parent.queryTaskbarInfo) {
|
|
11402
|
+
var mainTaskbar = (cloneElement.querySelector('.e-gantt-child-taskbar'));
|
|
11360
11403
|
this.triggerQueryTaskbarInfoByIndex(mainTaskbar, ganttData);
|
|
11361
11404
|
}
|
|
11362
11405
|
var zIndex = "";
|
|
@@ -12880,7 +12923,9 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12880
12923
|
}
|
|
12881
12924
|
}
|
|
12882
12925
|
}
|
|
12883
|
-
|
|
12926
|
+
if (!this.parent.enableVirtualization) {
|
|
12927
|
+
heightValue = Math.abs(parentOverlapTopValue - childOverlapTopValue);
|
|
12928
|
+
}
|
|
12884
12929
|
}
|
|
12885
12930
|
if (this.parent.currentViewData[data.parentIndex] && this.parent.currentViewData[data.childIndex] && this.parent.allowParentDependency) {
|
|
12886
12931
|
var fromRecordIsParent = this.parent.currentViewData[data.parentIndex].hasChildRecords;
|
|
@@ -12971,6 +13016,9 @@ var ConnectorLine = /** @__PURE__ @class */ (function () {
|
|
|
12971
13016
|
d: this.arrowPath,
|
|
12972
13017
|
class: connectorLineArrow
|
|
12973
13018
|
});
|
|
13019
|
+
var outlineColor = (this.lineColor) && !(this.parent.enableCriticalPath) ? this.lineColor : '';
|
|
13020
|
+
this.connectorPath.setAttribute('style', "stroke: " + outlineColor);
|
|
13021
|
+
this.arrowlinePath.setAttribute('style', "fill: " + outlineColor);
|
|
12974
13022
|
// Append the path element to the group element
|
|
12975
13023
|
this.groupObject.appendChild(this.connectorPath);
|
|
12976
13024
|
this.groupObject.appendChild(this.arrowlinePath);
|
|
@@ -19108,6 +19156,8 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19108
19156
|
__extends$20(TaskbarEdit, _super);
|
|
19109
19157
|
function TaskbarEdit(ganttObj) {
|
|
19110
19158
|
var _this = _super.call(this, ganttObj) || this;
|
|
19159
|
+
_this.leftValue = 0;
|
|
19160
|
+
_this.previousLeftValue = 0;
|
|
19111
19161
|
_this.isMouseDragged = false;
|
|
19112
19162
|
_this.dependencyCancel = false;
|
|
19113
19163
|
_this.editElement = null;
|
|
@@ -19119,7 +19169,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19119
19169
|
_this.currentItemTop = 0;
|
|
19120
19170
|
_this.currentItemPrevTop = 0;
|
|
19121
19171
|
_this.topValue = 0;
|
|
19122
|
-
_this.draggedRecordMarginTop =
|
|
19172
|
+
_this.draggedRecordMarginTop = '0px';
|
|
19123
19173
|
_this.parent = ganttObj;
|
|
19124
19174
|
_this.initPublicProp();
|
|
19125
19175
|
_this.wireEvents();
|
|
@@ -19590,17 +19640,6 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19590
19640
|
this.mouseDownY = this.dragMoveY = e.pageY - containerPosition.top +
|
|
19591
19641
|
this.parent.ganttChartModule.scrollObject.previousScroll.top;
|
|
19592
19642
|
}
|
|
19593
|
-
if (this.parent.viewType == "ResourceView" && this.parent.allowTaskbarDragAndDrop) {
|
|
19594
|
-
var toolbarHeight = 0;
|
|
19595
|
-
if (!isNullOrUndefined(this.parent.toolbarModule) && !isNullOrUndefined(this.parent.toolbarModule.element)) {
|
|
19596
|
-
toolbarHeight = this.parent.toolbarModule.element.offsetHeight;
|
|
19597
|
-
}
|
|
19598
|
-
this.topValue = this.parent.getOffsetRect(event.target).top - this.parent.getOffsetRect(this.parent.element).top -
|
|
19599
|
-
parseInt((closest(event.target, '.e-taskbar-main-container'))['style'].marginTop) -
|
|
19600
|
-
this.parent.element.getElementsByClassName('e-timeline-header-container')[0]['offsetHeight'] -
|
|
19601
|
-
toolbarHeight + document.getElementsByClassName('e-chart-scroll-container e-content')[0].scrollTop;
|
|
19602
|
-
this.currentItemPrevTop = this.currentItemTop = this.topValue;
|
|
19603
|
-
}
|
|
19604
19643
|
if (this.taskBarEditAction === 'ConnectorPointLeftDrag' || this.taskBarEditAction === 'ConnectorPointRightDrag') {
|
|
19605
19644
|
this.fromPredecessorText = this.taskBarEditAction === 'ConnectorPointLeftDrag' ? 'start' : 'finish';
|
|
19606
19645
|
this.parent.connectorLineModule.tooltipTable.innerHTML = this.parent.connectorLineModule.getConnectorLineTooltipInnerTd(this.taskBarEditRecord.ganttProperties.taskName, this.fromPredecessorText, '', '');
|
|
@@ -19664,7 +19703,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19664
19703
|
currentElement.parentElement.appendChild(this.taskbarElement);
|
|
19665
19704
|
}
|
|
19666
19705
|
else {
|
|
19667
|
-
|
|
19706
|
+
if (this.parent.allowTaskbarDragAndDrop && this.taskBarEditAction !== 'LeftResizing' && this.taskBarEditAction !== 'RightResizing' && this.taskBarEditAction !== 'ProgressResizing') {
|
|
19707
|
+
this.parent.chartPane.getElementsByClassName('e-gantt-chart')[0].appendChild(this.taskbarElement);
|
|
19708
|
+
}
|
|
19709
|
+
else {
|
|
19710
|
+
currentElement.appendChild(this.taskbarElement);
|
|
19711
|
+
}
|
|
19668
19712
|
}
|
|
19669
19713
|
if (this.taskBarEditAction !== 'ProgressResizing') {
|
|
19670
19714
|
var rootElement = this.parent.ganttChartModule.chartBodyContainer.querySelectorAll(".e-chart-rows-container");
|
|
@@ -19747,26 +19791,40 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
19747
19791
|
this.triggerDependencyEvent(e);
|
|
19748
19792
|
this.drawFalseLine();
|
|
19749
19793
|
}
|
|
19750
|
-
if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop) {
|
|
19751
|
-
|
|
19752
|
-
|
|
19753
|
-
|
|
19754
|
-
}
|
|
19755
|
-
|
|
19756
|
-
|
|
19757
|
-
|
|
19758
|
-
|
|
19759
|
-
|
|
19760
|
-
|
|
19761
|
-
|
|
19794
|
+
if (this.parent.viewType == 'ResourceView' && this.parent.allowTaskbarDragAndDrop && this.taskBarEditAction !== 'LeftResizing' && this.taskBarEditAction !== 'RightResizing' && this.taskBarEditAction !== 'ProgressResizing') {
|
|
19795
|
+
var parentClientRect = this.parent.getOffsetRect(this.parent.chartPane);
|
|
19796
|
+
var coordinates = this.getCoordinate(e);
|
|
19797
|
+
var position = { top: coordinates.pageY, left: coordinates.pageX };
|
|
19798
|
+
var pos = { left: Math.abs(position.left - parentClientRect.left), top: position.top - parentClientRect.top };
|
|
19799
|
+
var parentRecord = this.parent.getRecordByID(this.taskBarEditRecord.parentItem.taskId);
|
|
19800
|
+
if (!this.parent.allowTaskbarOverlap && this.taskBarEditRecord.parentItem && !parentRecord.expanded) {
|
|
19801
|
+
var reduceHeight = 0;
|
|
19802
|
+
if (parseInt(this.editElement['style'].marginTop) > this.parent.rowHeight) {
|
|
19803
|
+
for (var i = 0; i < parentRecord.childRecords.length; i++) {
|
|
19804
|
+
if (parentRecord.childRecords[i].ganttProperties.taskId !== this.taskBarEditRecord.ganttProperties.taskId) {
|
|
19805
|
+
reduceHeight = reduceHeight + this.parent.rowHeight;
|
|
19806
|
+
}
|
|
19807
|
+
else {
|
|
19808
|
+
break;
|
|
19809
|
+
}
|
|
19810
|
+
}
|
|
19811
|
+
pos.top = pos.top - reduceHeight;
|
|
19812
|
+
}
|
|
19762
19813
|
}
|
|
19763
|
-
|
|
19764
|
-
|
|
19814
|
+
this.topValue = pos.top;
|
|
19815
|
+
this.leftValue = pos.left - (e.pageX - this.parent.getOffsetRect(this.taskBarEditElement).left) + (this.previousLeftValue !== 0 ? e.pageX - this.previousLeftValue : 0);
|
|
19816
|
+
if (this.previousLeftValue == 0) {
|
|
19817
|
+
if (!this.parent.enableRtl) {
|
|
19818
|
+
this.leftValue = this.leftValue - this.parent.ganttChartModule.scrollObject.previousScroll.left + 4;
|
|
19819
|
+
}
|
|
19820
|
+
else {
|
|
19821
|
+
this.leftValue = this.leftValue + Math.abs(this.parent.ganttChartModule.scrollObject.previousScroll.left) + 4;
|
|
19822
|
+
}
|
|
19765
19823
|
}
|
|
19766
|
-
this.
|
|
19767
|
-
|
|
19768
|
-
|
|
19769
|
-
|
|
19824
|
+
this.previousLeftValue = e.pageX;
|
|
19825
|
+
}
|
|
19826
|
+
else {
|
|
19827
|
+
this.leftValue = this.taskBarEditRecord.ganttProperties.left;
|
|
19770
19828
|
}
|
|
19771
19829
|
this.setItemPosition();
|
|
19772
19830
|
this.updateEditedItem();
|
|
@@ -20655,7 +20713,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20655
20713
|
}
|
|
20656
20714
|
}
|
|
20657
20715
|
}
|
|
20658
|
-
taskBarMainContainer$$1.style.setProperty(position, (item.left) + 'px');
|
|
20716
|
+
taskBarMainContainer$$1.style.setProperty(position, (this.parent.allowTaskbarDragAndDrop ? this.leftValue : (item.left)) + 'px');
|
|
20659
20717
|
taskBarMainContainer$$1.style.width = (width) + 'px';
|
|
20660
20718
|
if (segmentedTaskBarContainer && segmentConnectorPointRight) {
|
|
20661
20719
|
segmentConnectorPointRight.style.left = (this.parent.isAdaptive ? (width + 10) : (width + 2)) + 'px';
|
|
@@ -20675,7 +20733,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20675
20733
|
segmentElement.style.width = (segment_4.width) + 'px';
|
|
20676
20734
|
if (i === 0) {
|
|
20677
20735
|
resizeLine.style.width = (segment_4.width) + "px";
|
|
20678
|
-
resizeLine.style.
|
|
20736
|
+
resizeLine.style.setProperty(position, (segment_4.left + item.left) + 'px');
|
|
20679
20737
|
}
|
|
20680
20738
|
if (this.parent.enableRtl) {
|
|
20681
20739
|
segmentElement.style.right = (segment_4.left) + 'px';
|
|
@@ -20687,7 +20745,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20687
20745
|
}
|
|
20688
20746
|
if (this.taskBarEditAction === 'ChildDrag' && this.segmentIndex === 0) {
|
|
20689
20747
|
resizeLine.style.width = (width) + "px";
|
|
20690
|
-
resizeLine.style.
|
|
20748
|
+
resizeLine.style.setProperty(position, item.left + 'px');
|
|
20691
20749
|
taskBarMainContainer$$1.style.setProperty("opacity", '.75');
|
|
20692
20750
|
}
|
|
20693
20751
|
}
|
|
@@ -20701,7 +20759,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20701
20759
|
}
|
|
20702
20760
|
if (this.taskBarEditAction === 'MilestoneDrag' || item.isMilestone) {
|
|
20703
20761
|
taskBarMainContainer$$1.style.setProperty(position, (item.left - (width / 2)) + 'px');
|
|
20704
|
-
resizeLine.style.
|
|
20762
|
+
resizeLine.style.setProperty(position, (item.left - (width / 2)) + 'px');
|
|
20705
20763
|
resizeLine.style.width = (width) + "px";
|
|
20706
20764
|
}
|
|
20707
20765
|
else if (this.taskBarEditAction === 'ProgressResizing') {
|
|
@@ -20736,7 +20794,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20736
20794
|
}
|
|
20737
20795
|
}
|
|
20738
20796
|
else if (this.taskBarEditAction === 'ParentDrag') {
|
|
20739
|
-
resizeLine.style.
|
|
20797
|
+
resizeLine.style.setProperty(position, item.left + 'px');
|
|
20740
20798
|
resizeLine.style.width = (width) + "px";
|
|
20741
20799
|
resizeLine.style.width = (item.width) + 'px';
|
|
20742
20800
|
if (!isNullOrUndefined(traceParentTaskBar$$1)) {
|
|
@@ -20749,13 +20807,13 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20749
20807
|
}
|
|
20750
20808
|
else if (this.taskBarEditAction === 'ParentResizing') {
|
|
20751
20809
|
resizeLine.style.width = (item.width) + 'px';
|
|
20752
|
-
resizeLine.style.
|
|
20810
|
+
resizeLine.style.setProperty(position, item.left + 'px');
|
|
20753
20811
|
manualParentTaskbar.style.width = manualTaskbar.style.width = (item.width) + 'px';
|
|
20754
20812
|
manualParentRight.style.setProperty(position, item.width - manualParentLeft.offsetLeft + 'px');
|
|
20755
20813
|
}
|
|
20756
20814
|
else if (this.taskBarEditAction === 'ManualParentDrag') {
|
|
20757
20815
|
resizeLine.style.width = (item.width) + 'px';
|
|
20758
|
-
resizeLine.style.
|
|
20816
|
+
resizeLine.style.setProperty(position, item.left + 'px');
|
|
20759
20817
|
manualParentTaskbar.style.setProperty(position, item.left - item.autoLeft + 'px');
|
|
20760
20818
|
}
|
|
20761
20819
|
else {
|
|
@@ -20763,8 +20821,8 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20763
20821
|
traceChildTaskBar$$1.style.width = (item.width) + 'px';
|
|
20764
20822
|
traceChildTaskBar$$1.style.left = (item.left) + 'px';
|
|
20765
20823
|
this.taskBarEditElement.style.width = (item.width) + 'px';
|
|
20766
|
-
this.taskBarEditElement.style.left = (item.left) + "px";
|
|
20767
|
-
resizeLine.style.
|
|
20824
|
+
this.taskBarEditElement.style.left = ((this.parent.allowTaskbarDragAndDrop ? this.leftValue : (item.left))) + "px";
|
|
20825
|
+
resizeLine.style.setProperty(position, item.left + 'px');
|
|
20768
20826
|
resizeLine.style.width = (item.width) + "px";
|
|
20769
20827
|
}
|
|
20770
20828
|
if (!isNullOrUndefined(traceChildProgressBar$$1)) {
|
|
@@ -20798,6 +20856,13 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20798
20856
|
if (this.taskBarEditAction && this.isMouseDragged) {
|
|
20799
20857
|
if ((!this.dragMouseLeave && this.taskBarEditedAction) || (this.parent.viewType === 'ResourceView' &&
|
|
20800
20858
|
this.parent.allowTaskbarDragAndDrop)) {
|
|
20859
|
+
if (e.type === 'touchmove' || e.type === 'touchstart' || e.type === 'touchend') {
|
|
20860
|
+
var coordinates = this.getCoordinate(e);
|
|
20861
|
+
this['droppedTarget'] = document.elementFromPoint(coordinates.pageX, coordinates.pageY);
|
|
20862
|
+
}
|
|
20863
|
+
else {
|
|
20864
|
+
this['droppedTarget'] = document.elementFromPoint(e.x, e.y);
|
|
20865
|
+
}
|
|
20801
20866
|
this.taskBarEditedAction(e);
|
|
20802
20867
|
this.isMouseDragged = false;
|
|
20803
20868
|
}
|
|
@@ -20908,7 +20973,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20908
20973
|
var args = extend({}, arg);
|
|
20909
20974
|
var ganttRecord = args.data;
|
|
20910
20975
|
var taskData = ganttRecord.ganttProperties;
|
|
20911
|
-
var draggedRecIndex = this.parent.
|
|
20976
|
+
var draggedRecIndex = this.parent.flatData.indexOf(ganttRecord);
|
|
20912
20977
|
if ((args.taskBarEditAction === 'MilestoneDrag' || args.taskBarEditAction === 'ChildDrag') && this.parent.viewType === "ResourceView"
|
|
20913
20978
|
&& this.parent.allowTaskbarDragAndDrop && this.dragMoveY > 0) {
|
|
20914
20979
|
if (this.parent.rowDragAndDropModule) {
|
|
@@ -20916,45 +20981,13 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
|
|
|
20916
20981
|
if (flatRecordCol[this.taskBarEditRecord.parentItem.index] && ((this.parent.editedRecords.indexOf(flatRecordCol[this.taskBarEditRecord.parentItem.index]) === -1))) {
|
|
20917
20982
|
this.parent.editedRecords.push(flatRecordCol[this.taskBarEditRecord.parentItem.index]);
|
|
20918
20983
|
}
|
|
20919
|
-
var
|
|
20920
|
-
|
|
20921
|
-
var
|
|
20922
|
-
var
|
|
20923
|
-
|
|
20924
|
-
|
|
20925
|
-
|
|
20926
|
-
if (resHeight < this.dragMoveY && this.parent.getRowByIndex(i).style.display !== 'none') {
|
|
20927
|
-
rowCount = i;
|
|
20928
|
-
resHeight = resHeight + parseInt(this.parent.getRowByIndex(i).style.height);
|
|
20929
|
-
if (!flatRecordCol[i].parentItem) {
|
|
20930
|
-
ganttrec = flatRecordCol[i];
|
|
20931
|
-
}
|
|
20932
|
-
else {
|
|
20933
|
-
ganttrec = this.parent.getRecordByID(flatRecordCol[i].parentItem.taskId);
|
|
20934
|
-
}
|
|
20935
|
-
}
|
|
20936
|
-
}
|
|
20937
|
-
var draggedRecordtaskbar = this.parent.getRowByIndex(draggedRecIndex).getElementsByClassName('e-taskbar-main-container');
|
|
20938
|
-
var taskbarContainer = this.parent.getRowByIndex(rowCount).getElementsByClassName('e-taskbar-main-container');
|
|
20939
|
-
for (var j = 0; j < taskbarContainer.length; j++) {
|
|
20940
|
-
if (taskbarContainer[j]['offsetTop'] < this.dragMoveY && draggedRecordtaskbar[0].getAttribute('rowuniqueid') !==
|
|
20941
|
-
taskbarContainer[j].getAttribute('rowuniqueid')) {
|
|
20942
|
-
this.draggedRecordMarginTop = taskbarContainer[j]['style'].marginTop;
|
|
20943
|
-
childIndex_1 = taskbarContainer[j].getAttribute('rowuniqueid');
|
|
20944
|
-
}
|
|
20945
|
-
}
|
|
20946
|
-
if (childIndex_1) {
|
|
20947
|
-
droppedRecord = this.parent.currentViewData.filter(function (data) {
|
|
20948
|
-
if (data['rowUniqueID'] === childIndex_1) {
|
|
20949
|
-
return data;
|
|
20950
|
-
}
|
|
20951
|
-
else {
|
|
20952
|
-
return null;
|
|
20953
|
-
}
|
|
20954
|
-
});
|
|
20955
|
-
}
|
|
20956
|
-
if (droppedRecord) {
|
|
20957
|
-
var droppedRecordIndex = this.parent.currentViewData.indexOf(droppedRecord[0]);
|
|
20984
|
+
var droppedRecord = [];
|
|
20985
|
+
this.draggedRecordMarginTop = this.taskBarEditElement.style.marginTop;
|
|
20986
|
+
var row = closest(this.droppedTarget, 'tr.' + chartRow);
|
|
20987
|
+
var recordIndex = parseInt(row.getAttribute('aria-rowindex'));
|
|
20988
|
+
droppedRecord.push(this.parent.flatData[recordIndex]);
|
|
20989
|
+
if (droppedRecord.length > 0) {
|
|
20990
|
+
var droppedRecordIndex = this.parent.flatData.indexOf(droppedRecord[0]);
|
|
20958
20991
|
var position = (droppedRecord[0].hasChildRecords || (!droppedRecord[0].parentItem &&
|
|
20959
20992
|
droppedRecord[0].childRecords.length == 0)) ? 'child' : 'below';
|
|
20960
20993
|
if (this.parent.rowDragAndDropModule) {
|
|
@@ -26031,7 +26064,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
26031
26064
|
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['endDate'] = rec[this.parent.taskFields.endDate];
|
|
26032
26065
|
}
|
|
26033
26066
|
if (this.parent.taskFields.duration !== null) {
|
|
26034
|
-
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['duration'] =
|
|
26067
|
+
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['duration'] = parseFloat(rec[this.parent.taskFields.duration]);
|
|
26035
26068
|
}
|
|
26036
26069
|
if (this.parent.taskFields.durationUnit !== null) {
|
|
26037
26070
|
this.parent.editedRecords[parseInt(i.toString(), 10)].ganttProperties['durationUnit'] = rec[this.parent.taskFields.durationUnit];
|
|
@@ -26120,6 +26153,9 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
26120
26153
|
this.parent.editModule.dialogModule.previousResource = [];
|
|
26121
26154
|
}
|
|
26122
26155
|
if (!this.isTreeGridRefresh) {
|
|
26156
|
+
if (this.parent.editSettings.allowEditing && this.parent.treeGrid.element.getElementsByClassName('e-editedbatchcell').length > 0) {
|
|
26157
|
+
this.parent.treeGrid.endEdit();
|
|
26158
|
+
}
|
|
26123
26159
|
this.parent.chartRowsModule.refreshRecords(this.parent.editedRecords);
|
|
26124
26160
|
if (this.parent.viewType === 'ResourceView' && !this.parent.allowTaskbarOverlap && this.parent.showOverAllocation) {
|
|
26125
26161
|
this.parent.contentHeight = this.parent['element'].getElementsByClassName('e-content')[0].children[0]['offsetHeight'];
|
|
@@ -27657,7 +27693,7 @@ var Edit$2 = /** @__PURE__ @class */ (function () {
|
|
|
27657
27693
|
args.data.ganttProperties['endDate'] = serverReturnedValue[this.parent.taskFields.endDate];
|
|
27658
27694
|
}
|
|
27659
27695
|
if (this.parent.taskFields.duration !== null) {
|
|
27660
|
-
args.data.ganttProperties['duration'] =
|
|
27696
|
+
args.data.ganttProperties['duration'] = parseFloat(serverReturnedValue[this.parent.taskFields.duration]);
|
|
27661
27697
|
}
|
|
27662
27698
|
if (this.parent.taskFields.durationUnit !== null) {
|
|
27663
27699
|
args.data.ganttProperties['durationUnit'] = serverReturnedValue[this.parent.taskFields.durationUnit];
|
|
@@ -31355,6 +31391,7 @@ var CriticalPath = /** @__PURE__ @class */ (function () {
|
|
|
31355
31391
|
fromRecord.isCritical = record.ganttProperties.isCritical;
|
|
31356
31392
|
fromRecord.ganttProperties.isCritical = record.ganttProperties.isCritical;
|
|
31357
31393
|
if (criticalPathIds.indexOf(fromRecord.ganttProperties.taskId) === -1 && fromRecord.ganttProperties.isCritical && fromRecord.ganttProperties.progress < 100) {
|
|
31394
|
+
criticalPathIds.push(fromRecord.ganttProperties.taskId);
|
|
31358
31395
|
this.validatedids.push(parseInt(fromRecord.ganttProperties.taskId));
|
|
31359
31396
|
if (this.criticalTasks.indexOf(fromRecord) === -1) {
|
|
31360
31397
|
this.criticalTasks.push(fromRecord);
|
|
@@ -32929,12 +32966,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
32929
32966
|
RowDD$$1.prototype.deleteSharedResourceTask = function () {
|
|
32930
32967
|
for (var i = 0; i < this.parent.getTaskIds().length; i++) {
|
|
32931
32968
|
if (this.parent.getTaskIds()[i] === 'T' + this.draggedRecord.ganttProperties.taskId) {
|
|
32932
|
-
if (this.parent.getTaskByUniqueID(this.parent.
|
|
32933
|
-
this.removeRecords(this.parent.
|
|
32969
|
+
if (this.parent.getTaskByUniqueID(this.parent.flatData[i].parentItem.uniqueID).ganttProperties.taskName !== 'Unassigned Task') {
|
|
32970
|
+
this.removeRecords(this.parent.flatData[i]);
|
|
32934
32971
|
}
|
|
32935
32972
|
/* eslint-disable-next-line */
|
|
32936
|
-
if (!isNullOrUndefined(this.parent.
|
|
32937
|
-
this.updateParentRecords.push(this.parent.
|
|
32973
|
+
if (!isNullOrUndefined(this.parent.flatData[i].parentItem && this.updateParentRecords.indexOf(this.parent.flatData[i].parentItem) !== -1)) {
|
|
32974
|
+
this.updateParentRecords.push(this.parent.flatData[i].parentItem);
|
|
32938
32975
|
}
|
|
32939
32976
|
}
|
|
32940
32977
|
}
|
|
@@ -32958,7 +32995,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
32958
32995
|
this.parent.editModule.updateGanttProperties(this.draggedRecord, this.parent.flatData[i]);
|
|
32959
32996
|
this.parent.dataOperation.updateTaskData(this.parent.flatData[i]);
|
|
32960
32997
|
/* eslint-disable-next-line */
|
|
32961
|
-
if (!isNullOrUndefined(this.parent.flatData[i].parentItem && this.updateParentRecords.indexOf(this.parent.
|
|
32998
|
+
if (!isNullOrUndefined(this.parent.flatData[i].parentItem && this.updateParentRecords.indexOf(this.parent.flatData[i].parentItem) !== -1)) {
|
|
32962
32999
|
this.updateParentRecords.push(this.parent.flatData[i].parentItem);
|
|
32963
33000
|
}
|
|
32964
33001
|
}
|
|
@@ -33389,7 +33426,7 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
33389
33426
|
}
|
|
33390
33427
|
var data = [];
|
|
33391
33428
|
for (var i = 0; i < fromIndexes.length; i++) {
|
|
33392
|
-
data[i] = this.parent.
|
|
33429
|
+
data[i] = this.parent.flatData[fromIndexes[i]];
|
|
33393
33430
|
}
|
|
33394
33431
|
var isByMethod = true;
|
|
33395
33432
|
var args = {
|
|
@@ -35966,10 +36003,10 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
35966
36003
|
this.parent.predecessorModule.createConnectorLinesCollection();
|
|
35967
36004
|
this.parent.updatedConnectorLineCollection.forEach(function (data) {
|
|
35968
36005
|
var predecessor = _this.gantt.predecessor.add();
|
|
35969
|
-
predecessor.parentLeft = data.parentLeft;
|
|
35970
|
-
predecessor.childLeft = data.childLeft;
|
|
35971
|
-
predecessor.parentWidth = data.parentWidth;
|
|
35972
|
-
predecessor.childWidth = data.childWidth;
|
|
36006
|
+
predecessor.parentLeft = pointToPixel(data.parentLeft);
|
|
36007
|
+
predecessor.childLeft = pointToPixel(data.childLeft);
|
|
36008
|
+
predecessor.parentWidth = pointToPixel(data.parentWidth);
|
|
36009
|
+
predecessor.childWidth = pointToPixel(data.childWidth);
|
|
35973
36010
|
predecessor.parentIndex = data.parentIndex;
|
|
35974
36011
|
predecessor.childIndex = data.childIndex;
|
|
35975
36012
|
predecessor.rowHeight = data.rowHeight;
|
|
@@ -36054,8 +36091,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
36054
36091
|
flatData.forEach(function (data) {
|
|
36055
36092
|
var taskbar = _this.gantt.taskbar.add();
|
|
36056
36093
|
var ganttProp = data.ganttProperties;
|
|
36057
|
-
taskbar.left = ganttProp.left;
|
|
36058
|
-
taskbar.width = ganttProp.width;
|
|
36094
|
+
taskbar.left = pointToPixel(ganttProp.left);
|
|
36095
|
+
taskbar.width = pointToPixel(ganttProp.width);
|
|
36059
36096
|
if (taskbar.left < 0) {
|
|
36060
36097
|
taskbar.width = taskbar.width + taskbar.left;
|
|
36061
36098
|
taskbar.left = 0;
|
|
@@ -36096,8 +36133,8 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
36096
36133
|
taskbar.isMilestone = ganttProp.isMilestone;
|
|
36097
36134
|
taskbar.baselineStartDate = ganttProp.baselineStartDate;
|
|
36098
36135
|
taskbar.baselineEndDate = ganttProp.baselineEndDate;
|
|
36099
|
-
taskbar.baselineLeft = ganttProp.baselineLeft;
|
|
36100
|
-
taskbar.baselineWidth = ganttProp.baselineWidth;
|
|
36136
|
+
taskbar.baselineLeft = pointToPixel(ganttProp.baselineLeft);
|
|
36137
|
+
taskbar.baselineWidth = pointToPixel(ganttProp.baselineWidth);
|
|
36101
36138
|
taskbar.milestoneColor = new PdfColor(_this.ganttStyle.taskbar.milestoneColor);
|
|
36102
36139
|
taskbar.isParentTask = data.hasChildRecords;
|
|
36103
36140
|
if (ganttProp.isMilestone) {
|
|
@@ -36113,9 +36150,9 @@ var ExportHelper = /** @__PURE__ @class */ (function () {
|
|
|
36113
36150
|
taskbar.taskLabel = data[_this.parent.labelSettings.taskLabel].toString();
|
|
36114
36151
|
}
|
|
36115
36152
|
var reduceLeft = ganttProp.isMilestone ? Math.floor(_this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
|
|
36116
|
-
taskbar.rightTaskLabel.left = ganttProp.left + ganttProp.width + reduceLeft; // right label left value
|
|
36153
|
+
taskbar.rightTaskLabel.left = pointToPixel(ganttProp.left) + pointToPixel(ganttProp.width) + reduceLeft; // right label left value
|
|
36117
36154
|
taskbar.fontFamily = _this.ganttStyle.fontFamily;
|
|
36118
|
-
taskbar.progressWidth = ganttProp.progressWidth;
|
|
36155
|
+
taskbar.progressWidth = pointToPixel(ganttProp.progressWidth);
|
|
36119
36156
|
taskbar.labelColor = new PdfColor(_this.ganttStyle.label.fontColor);
|
|
36120
36157
|
taskbar.progressFontColor = new PdfColor(_this.ganttStyle.taskbar.progressFontColor);
|
|
36121
36158
|
if (taskbar.isParentTask) {
|