@syncfusion/ej2-gantt 21.2.10 → 22.1.34
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/.eslintrc.json +1 -0
- package/CHANGELOG.md +12 -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 +734 -711
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +773 -751
- 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 +20 -19
- package/src/gantt/actions/connector-line-edit.js +21 -26
- package/src/gantt/actions/context-menu.js +2 -2
- package/src/gantt/actions/critical-path.js +4 -9
- package/src/gantt/actions/day-markers.js +4 -1
- package/src/gantt/actions/edit.js +8 -6
- package/src/gantt/actions/pdf-export.js +1 -1
- package/src/gantt/actions/taskbar-edit.d.ts +6 -0
- package/src/gantt/actions/taskbar-edit.js +120 -45
- package/src/gantt/base/css-constants.d.ts +5 -10
- package/src/gantt/base/css-constants.js +5 -10
- package/src/gantt/base/date-processor.js +1 -19
- package/src/gantt/base/enum.d.ts +215 -231
- package/src/gantt/base/gantt-chart.js +112 -5
- package/src/gantt/base/gantt-model.d.ts +6 -3
- package/src/gantt/base/gantt.d.ts +7 -3
- package/src/gantt/base/gantt.js +17 -13
- package/src/gantt/base/interface.d.ts +36 -1
- package/src/gantt/base/task-processor.js +14 -15
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/export/export-helper.js +1 -0
- package/src/gantt/export/pdf-connector-line.d.ts +4 -4
- package/src/gantt/export/pdf-connector-line.js +11 -22
- package/src/gantt/export/pdf-gantt.d.ts +1 -2
- package/src/gantt/export/pdf-gantt.js +4 -4
- package/src/gantt/models/column.d.ts +8 -4
- package/src/gantt/models/edit-settings-model.d.ts +1 -0
- package/src/gantt/models/edit-settings.d.ts +1 -0
- package/src/gantt/models/filter-settings-model.d.ts +3 -0
- package/src/gantt/models/filter-settings.d.ts +3 -0
- package/src/gantt/models/search-settings-model.d.ts +1 -0
- package/src/gantt/models/search-settings.d.ts +1 -0
- package/src/gantt/models/sort-settings-model.d.ts +1 -0
- package/src/gantt/models/sort-settings.d.ts +1 -0
- package/src/gantt/models/tooltip-settings-model.d.ts +8 -4
- package/src/gantt/models/tooltip-settings.d.ts +8 -4
- package/src/gantt/renderer/chart-rows.d.ts +1 -1
- package/src/gantt/renderer/chart-rows.js +27 -65
- package/src/gantt/renderer/connector-line.d.ts +23 -0
- package/src/gantt/renderer/connector-line.js +287 -384
- package/src/gantt/renderer/edit-tooltip.js +4 -4
- package/src/gantt/renderer/nonworking-day.js +2 -2
- package/src/gantt/renderer/tooltip.d.ts +3 -3
- package/src/gantt/renderer/tooltip.js +103 -76
- package/styles/bootstrap-dark.css +27 -47
- package/styles/bootstrap.css +29 -49
- package/styles/bootstrap4.css +29 -49
- package/styles/bootstrap5-dark.css +27 -47
- package/styles/bootstrap5.css +27 -47
- package/styles/fabric-dark.css +27 -47
- package/styles/fabric.css +27 -47
- package/styles/fluent-dark.css +28 -47
- package/styles/fluent.css +28 -47
- package/styles/gantt/_layout.scss +53 -7
- package/styles/gantt/_material3-dark-definition.scss +1 -0
- package/styles/gantt/_material3-definition.scss +220 -0
- package/styles/gantt/_theme.scss +53 -53
- package/styles/gantt/bootstrap-dark.css +27 -47
- package/styles/gantt/bootstrap.css +29 -49
- package/styles/gantt/bootstrap4.css +29 -49
- package/styles/gantt/bootstrap5-dark.css +27 -47
- package/styles/gantt/bootstrap5.css +27 -47
- package/styles/gantt/fabric-dark.css +27 -47
- package/styles/gantt/fabric.css +27 -47
- package/styles/gantt/fluent-dark.css +28 -47
- package/styles/gantt/fluent.css +28 -47
- package/styles/gantt/highcontrast-light.css +27 -47
- package/styles/gantt/highcontrast.css +27 -47
- package/styles/gantt/icons/_material3-dark.scss +1 -0
- package/styles/gantt/material-dark.css +27 -47
- package/styles/gantt/material.css +27 -47
- package/styles/gantt/material3-dark.css +2184 -0
- package/styles/gantt/material3-dark.scss +23 -0
- package/styles/gantt/material3.css +2240 -0
- package/styles/gantt/material3.scss +23 -0
- package/styles/gantt/tailwind-dark.css +27 -47
- package/styles/gantt/tailwind.css +27 -47
- package/styles/highcontrast-light.css +27 -47
- package/styles/highcontrast.css +27 -47
- package/styles/material-dark.css +27 -47
- package/styles/material.css +27 -47
- package/styles/material3-dark.css +2184 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +2240 -0
- package/styles/material3.scss +3 -0
- package/styles/tailwind-dark.css +27 -47
- package/styles/tailwind.css +27 -47
|
@@ -56,12 +56,12 @@ var PdfGantt = /** @class */ (function (_super) {
|
|
|
56
56
|
enumerable: true,
|
|
57
57
|
configurable: true
|
|
58
58
|
});
|
|
59
|
-
PdfGantt.prototype.drawChart = function (result
|
|
59
|
+
PdfGantt.prototype.drawChart = function (result) {
|
|
60
60
|
this.result = result;
|
|
61
61
|
this.totalPages = this.result.page.section.count;
|
|
62
62
|
this.perColumnPages = this.totalPages / this.layouter.columnRanges.length;
|
|
63
63
|
this.calculateRange();
|
|
64
|
-
this.drawGantttChart(
|
|
64
|
+
this.drawGantttChart();
|
|
65
65
|
this.drawPageBorder();
|
|
66
66
|
};
|
|
67
67
|
//Calcualte the header range for each pdf page based on schedule start and end date.
|
|
@@ -210,7 +210,7 @@ var PdfGantt = /** @class */ (function (_super) {
|
|
|
210
210
|
}
|
|
211
211
|
};
|
|
212
212
|
//Draw the gantt chart side
|
|
213
|
-
PdfGantt.prototype.drawGantttChart = function (
|
|
213
|
+
PdfGantt.prototype.drawGantttChart = function () {
|
|
214
214
|
var _this = this;
|
|
215
215
|
var taskbarPoint = this.startPoint;
|
|
216
216
|
var pagePoint = new PointF();
|
|
@@ -286,7 +286,7 @@ var PdfGantt = /** @class */ (function (_super) {
|
|
|
286
286
|
// Draw predecessor line.
|
|
287
287
|
for (var i = 0; i < this.predecessorCollection.length; i++) {
|
|
288
288
|
var predecessor = this.predecessorCollection[i];
|
|
289
|
-
predecessor.drawPredecessor(this
|
|
289
|
+
predecessor.drawPredecessor(this);
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
292
|
return PdfGantt;
|
|
@@ -122,8 +122,9 @@ export declare class Column {
|
|
|
122
122
|
* Defines the header template as string or HTML element ID which is used to add customized element in the column header.
|
|
123
123
|
*
|
|
124
124
|
* @default null
|
|
125
|
+
* @aspType string
|
|
125
126
|
*/
|
|
126
|
-
headerTemplate: string;
|
|
127
|
+
headerTemplate: string | Function;
|
|
127
128
|
/**
|
|
128
129
|
* Defines the header text of column which is used to display in column header.
|
|
129
130
|
* If `headerText` is not defined, then field name value will be assigned to header text.
|
|
@@ -163,8 +164,9 @@ export declare class Column {
|
|
|
163
164
|
* It accepts either template string or HTML element ID.
|
|
164
165
|
*
|
|
165
166
|
* @default null
|
|
167
|
+
* @aspType string
|
|
166
168
|
*/
|
|
167
|
-
template: string;
|
|
169
|
+
template: string | Function;
|
|
168
170
|
/**
|
|
169
171
|
* Defines the alignment of the column in both header and content cells.
|
|
170
172
|
*
|
|
@@ -323,8 +325,9 @@ export interface ColumnModel {
|
|
|
323
325
|
* Defines the header template as string or HTML element ID which is used to add customized element in the column header.
|
|
324
326
|
*
|
|
325
327
|
* @default null
|
|
328
|
+
* @aspType string
|
|
326
329
|
*/
|
|
327
|
-
headerTemplate?: string;
|
|
330
|
+
headerTemplate?: string | Function;
|
|
328
331
|
/**
|
|
329
332
|
* Defines the header text of column which is used to display in column header.
|
|
330
333
|
* If `headerText` is not defined, then field name value will be assigned to header text.
|
|
@@ -364,8 +367,9 @@ export interface ColumnModel {
|
|
|
364
367
|
* It accepts either template string or HTML element ID.
|
|
365
368
|
*
|
|
366
369
|
* @default null
|
|
370
|
+
* @aspType string
|
|
367
371
|
*/
|
|
368
|
-
template?: string;
|
|
372
|
+
template?: string | Function;
|
|
369
373
|
/**
|
|
370
374
|
* Defines the alignment of the column in both header and content cells.
|
|
371
375
|
*
|
|
@@ -18,6 +18,8 @@ export interface FilterSettingsModel {
|
|
|
18
18
|
* * `Menu` - Enables menu filters in Grid.
|
|
19
19
|
*
|
|
20
20
|
* @default Menu
|
|
21
|
+
* @isenumeration true
|
|
22
|
+
* @asptype FilterType
|
|
21
23
|
*/
|
|
22
24
|
type?: FilterType;
|
|
23
25
|
|
|
@@ -45,6 +47,7 @@ export interface FilterSettingsModel {
|
|
|
45
47
|
*
|
|
46
48
|
* @default Parent
|
|
47
49
|
* @isEnumeration true
|
|
50
|
+
* @asptype FilterHierarchyMode
|
|
48
51
|
*/
|
|
49
52
|
hierarchyMode?: FilterHierarchyMode;
|
|
50
53
|
|
|
@@ -17,6 +17,8 @@ export declare class FilterSettings extends ChildProperty<FilterSettings> {
|
|
|
17
17
|
* * `Menu` - Enables menu filters in Grid.
|
|
18
18
|
*
|
|
19
19
|
* @default Menu
|
|
20
|
+
* @isenumeration true
|
|
21
|
+
* @asptype FilterType
|
|
20
22
|
*/
|
|
21
23
|
type: FilterType;
|
|
22
24
|
/**
|
|
@@ -41,6 +43,7 @@ export declare class FilterSettings extends ChildProperty<FilterSettings> {
|
|
|
41
43
|
*
|
|
42
44
|
* @default Parent
|
|
43
45
|
* @isEnumeration true
|
|
46
|
+
* @asptype FilterHierarchyMode
|
|
44
47
|
*/
|
|
45
48
|
hierarchyMode: FilterHierarchyMode;
|
|
46
49
|
}
|
|
@@ -16,28 +16,32 @@ export interface TooltipSettingsModel {
|
|
|
16
16
|
* Defines tooltip template for taskbar elements.
|
|
17
17
|
*
|
|
18
18
|
* @default null
|
|
19
|
+
* @aspType string
|
|
19
20
|
*/
|
|
20
|
-
taskbar?: string;
|
|
21
|
+
taskbar?: string | Function;
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Defines template for baseline tooltip element.
|
|
24
25
|
*
|
|
25
26
|
* @default null
|
|
27
|
+
* @aspType string
|
|
26
28
|
*/
|
|
27
|
-
baseline?: string;
|
|
29
|
+
baseline?: string | Function;
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
32
|
* Defines template for dependency line tooltip.
|
|
31
33
|
*
|
|
32
34
|
* @default null
|
|
35
|
+
* @aspType string
|
|
33
36
|
*/
|
|
34
|
-
connectorLine?: string;
|
|
37
|
+
connectorLine?: string | Function;
|
|
35
38
|
|
|
36
39
|
/**
|
|
37
40
|
* Defines tooltip template for taskbar editing action.
|
|
38
41
|
*
|
|
39
42
|
* @default null
|
|
43
|
+
* @aspType string
|
|
40
44
|
*/
|
|
41
|
-
editing?: string;
|
|
45
|
+
editing?: string | Function;
|
|
42
46
|
|
|
43
47
|
}
|
|
@@ -13,24 +13,28 @@ export declare class TooltipSettings extends ChildProperty<TooltipSettings> {
|
|
|
13
13
|
* Defines tooltip template for taskbar elements.
|
|
14
14
|
*
|
|
15
15
|
* @default null
|
|
16
|
+
* @aspType string
|
|
16
17
|
*/
|
|
17
|
-
taskbar: string;
|
|
18
|
+
taskbar: string | Function;
|
|
18
19
|
/**
|
|
19
20
|
* Defines template for baseline tooltip element.
|
|
20
21
|
*
|
|
21
22
|
* @default null
|
|
23
|
+
* @aspType string
|
|
22
24
|
*/
|
|
23
|
-
baseline: string;
|
|
25
|
+
baseline: string | Function;
|
|
24
26
|
/**
|
|
25
27
|
* Defines template for dependency line tooltip.
|
|
26
28
|
*
|
|
27
29
|
* @default null
|
|
30
|
+
* @aspType string
|
|
28
31
|
*/
|
|
29
|
-
connectorLine: string;
|
|
32
|
+
connectorLine: string | Function;
|
|
30
33
|
/**
|
|
31
34
|
* Defines tooltip template for taskbar editing action.
|
|
32
35
|
*
|
|
33
36
|
* @default null
|
|
37
|
+
* @aspType string
|
|
34
38
|
*/
|
|
35
|
-
editing: string;
|
|
39
|
+
editing: string | Function;
|
|
36
40
|
}
|
|
@@ -267,7 +267,7 @@ export declare class ChartRows extends DateProcessor {
|
|
|
267
267
|
* @returns {Function} .
|
|
268
268
|
* @private
|
|
269
269
|
*/
|
|
270
|
-
templateCompiler(template: string): Function;
|
|
270
|
+
templateCompiler(template: string | Function): Function;
|
|
271
271
|
updateOverlapped(): void;
|
|
272
272
|
updateDragDropRecords(data: IGanttData, tr?: Node): void;
|
|
273
273
|
/**
|
|
@@ -75,7 +75,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
75
75
|
ChartRows.prototype.createChartTable = function () {
|
|
76
76
|
this.taskTable = createElement('table', {
|
|
77
77
|
className: cls.taskTable + ' ' + cls.zeroSpacing, id: 'GanttTaskTable' + this.parent.element.id,
|
|
78
|
-
styles: '
|
|
78
|
+
styles: 'position: absolute;width:' + this.parent.timelineModule.totalTimelineWidth + 'px;',
|
|
79
79
|
attrs: { cellspacing: '0.25px' }
|
|
80
80
|
});
|
|
81
81
|
var colgroup = createElement('colgroup');
|
|
@@ -159,7 +159,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
159
159
|
taskbarInnerDiv = this.createDivElement('<div class="' + cls.childTaskBarInnerDiv + ' ' + cls.traceChildTaskBar +
|
|
160
160
|
' ' + (data.ganttProperties.isAutoSchedule ? '' : cls.manualChildTaskBar) + '"' +
|
|
161
161
|
'style="width:' + data.ganttProperties.width + 'px;height:' +
|
|
162
|
-
(this.taskBarHeight) + 'px;"></div>');
|
|
162
|
+
(this.taskBarHeight) + 'px; margin-top :-1px"></div>');
|
|
163
163
|
progressDiv = this.createDivElement('<div class="' + cls.childProgressBarInnerDiv + ' ' +
|
|
164
164
|
cls.traceChildProgressBar + ' ' + (data.ganttProperties.isAutoSchedule ?
|
|
165
165
|
'' : cls.manualChildProgressBar) + '"' +
|
|
@@ -638,15 +638,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
638
638
|
milestoneNode = this.milestoneTemplateFunction(extend({ index: i }, data), this.parent, 'MilestoneTemplate', this.getTemplateID('MilestoneTemplate'), false, undefined, rootElement[0], this.parent.treeGrid['root']);
|
|
639
639
|
}
|
|
640
640
|
else {
|
|
641
|
-
var template = '<div class="' + cls.traceMilestone + '" style="
|
|
642
|
-
'
|
|
643
|
-
cls.unscheduledMilestoneTop : '') + '" style="border-right-width:' +
|
|
644
|
-
this.milesStoneRadius + 'px;border-left-width:' + this.milesStoneRadius + 'px;border-bottom-width:' +
|
|
645
|
-
this.milesStoneRadius + 'px;"></div>' +
|
|
646
|
-
'<div class="' + cls.milestoneBottom + ' ' + ((!data.ganttProperties.startDate && !data.ganttProperties.endDate) ?
|
|
647
|
-
cls.unscheduledMilestoneBottom : '') + '" style="top:' +
|
|
648
|
-
(this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
|
|
649
|
-
this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
|
|
641
|
+
var template = '<div class="' + cls.traceMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight - 3 : this.taskBarHeight - 7)) + 'px;height:' +
|
|
642
|
+
((this.parent.renderBaseline ? this.taskBarHeight - 3 : this.taskBarHeight - 7)) + 'px;position:absolute;transform: rotate(45deg);top:' + (this.parent.rowHeight > 40 ? 0 : 2) + 'px;left:' + (this.parent.renderBaseline ? 2 : 1) + 'px;"> </div>';
|
|
650
643
|
milestoneNode = this.createDivElement(template);
|
|
651
644
|
}
|
|
652
645
|
return milestoneNode;
|
|
@@ -674,25 +667,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
674
667
|
ChartRows.prototype.getMilestoneBaselineNode = function () {
|
|
675
668
|
var data = this.templateData;
|
|
676
669
|
var baselineMilestoneHeight = this.parent.renderBaseline ? 5 : 2;
|
|
677
|
-
var template = '<div class="' + cls.baselineMilestoneContainer + ' ' +
|
|
678
|
-
(this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.
|
|
679
|
-
'margin-top:' + (-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) +
|
|
680
|
-
'px">' + '<div class="' + cls.baselineMilestoneDiv + '">' + '<div class="' + cls.baselineMilestoneDiv +
|
|
681
|
-
' ' + cls.baselineMilestoneTop + '" ' +
|
|
682
|
-
'style="top:' + (-this.milestoneHeight) + 'px;border-right:' + this.milesStoneRadius +
|
|
683
|
-
'px solid transparent;border-left:' + this.milesStoneRadius +
|
|
684
|
-
'px solid transparent;border-top:0px' +
|
|
685
|
-
'solid transparent;border-bottom-width:' + this.milesStoneRadius + 'px;' +
|
|
686
|
-
'border-bottom-style: solid;' + (this.baselineColor ? 'border-bottom-color: ' + this.baselineColor + ';' : '') +
|
|
687
|
-
'"></div>' +
|
|
688
|
-
'<div class="' + cls.baselineMilestoneDiv + ' ' + cls.baselineMilestoneBottom + '" ' +
|
|
689
|
-
'style="top:' + (this.milesStoneRadius - this.milestoneHeight) + 'px;border-right:' + this.milesStoneRadius +
|
|
690
|
-
'px solid transparent;border-left:' + this.milesStoneRadius +
|
|
691
|
-
'px solid transparent;border-bottom:0px' +
|
|
692
|
-
'solid transparent;border-top-width:' + this.milesStoneRadius + 'px;' +
|
|
693
|
-
'border-top-style: solid;' +
|
|
694
|
-
(this.baselineColor ? 'border-top-color: ' + this.baselineColor + ';' : '') + '"></div>' +
|
|
695
|
-
'</div></div>';
|
|
670
|
+
var template = '<div class="' + cls.baselineMilestoneContainer + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight - 5 : this.taskBarHeight - 10) + 2) + 'px;height:' +
|
|
671
|
+
((this.parent.renderBaseline ? this.taskBarHeight - 5 : this.taskBarHeight - 10) + 2) + 'px;position:absolute;transform:rotate(45deg);' + (this.parent.enableRtl ? 'right:' : 'left:') + (this.parent.enableRtl ? (data.ganttProperties.left -
|
|
672
|
+
(this.milestoneHeight / 2) + 3) : (data.ganttProperties.left - (this.milestoneHeight / 2) + 2)) + 'px;' + (this.baselineColor ? 'background-color: ' + this.baselineColor + ';' : '') + 'margin-top:' + ((-Math.floor(this.parent.rowHeight - this.milestoneMarginTop) + baselineMilestoneHeight) + 3) + 'px"> </div>';
|
|
696
673
|
return this.createDivElement(template);
|
|
697
674
|
};
|
|
698
675
|
/**
|
|
@@ -818,16 +795,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
818
795
|
(this.parent.enableRtl ? 'right:' : 'left:') + (data.ganttProperties.width - Math.floor(((taskbarHeight / 5) + 8) / 5)) + 'px;height:' +
|
|
819
796
|
((taskbarHeight / 5) + 8) + 'px;border-right-width:' + taskbarHeight / 5 + 'px;border-bottom:' +
|
|
820
797
|
taskbarHeight / 5 + 'px solid transparent;>' + '</div></div>' : '');
|
|
821
|
-
var milestoneTemplate = '<div class="' + cls.manualParentMilestone + '" style="
|
|
822
|
-
(this.parent.
|
|
823
|
-
(data.ganttProperties.left - data.ganttProperties.autoLeft - (this.milestoneHeight / 2)) +
|
|
824
|
-
'px;width:' + (this.milesStoneRadius * 2) +
|
|
825
|
-
'px;">' + '<div class="' + cls.manualParentMilestoneTop + '" style="border-right-width:' +
|
|
826
|
-
this.milesStoneRadius + 'px;border-left-width:' + this.milesStoneRadius + 'px;border-bottom-width:' +
|
|
827
|
-
this.milesStoneRadius + 'px;"></div>' +
|
|
828
|
-
'<div class="' + cls.manualParentMilestoneBottom + '" style="top:' +
|
|
829
|
-
(this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
|
|
830
|
-
this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
|
|
798
|
+
var milestoneTemplate = '<div class="' + cls.manualParentMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight - 3 : this.taskBarHeight - 7)) + 'px;height:' +
|
|
799
|
+
((this.parent.renderBaseline ? this.taskBarHeight - 3 : this.taskBarHeight - 7)) + 'px;position:absolute;transform: rotate(45deg);top:' + (this.parent.rowHeight > 40 ? 0 : 2) + 'px;left:' + (this.parent.renderBaseline ? 2 : 1) + 'px;"> </div>';
|
|
831
800
|
return this.createDivElement(data.ganttProperties.duration !== 0 ? template : milestoneTemplate);
|
|
832
801
|
};
|
|
833
802
|
/**
|
|
@@ -852,8 +821,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
852
821
|
this.getExpandClass(data) + ' ' + cls.traceParentTaskBar + '"' +
|
|
853
822
|
' style="width:' + (data.ganttProperties.isAutoSchedule ? data.ganttProperties.width :
|
|
854
823
|
data.ganttProperties.autoWidth) + 'px;height:' + (data.ganttProperties.isAutoSchedule ? this.taskBarHeight :
|
|
855
|
-
(tHeight * 3)) + 'px;margin-top:' + (data.ganttProperties.isAutoSchedule ?
|
|
856
|
-
(tHeight * 2)) + 'px;">' +
|
|
824
|
+
(tHeight * 3)) + 'px;margin-top:' + (data.ganttProperties.isAutoSchedule ? -1 :
|
|
825
|
+
(tHeight * 2)) + 'px; ">' +
|
|
857
826
|
'</div>');
|
|
858
827
|
var progressBarInnerDiv = this.createDivElement('<div class="' + cls.parentProgressBarInnerDiv + ' ' +
|
|
859
828
|
this.getExpandClass(data) + ' ' + cls.traceParentProgressBar + '"' +
|
|
@@ -918,13 +887,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
918
887
|
parentLabel && !parentLabel['elementRef'] && div.innerHTML !== '')
|
|
919
888
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
|
|
920
889
|
}
|
|
921
|
-
var milestoneTemplate = '<div class="' + cls.parentMilestone + '" style="
|
|
922
|
-
'
|
|
923
|
-
this.milesStoneRadius + 'px;border-left-width:' + this.milesStoneRadius + 'px;border-bottom-width:' +
|
|
924
|
-
this.milesStoneRadius + 'px;"></div>' +
|
|
925
|
-
'<div class="' + cls.parentMilestoneBottom + '" style="top:' +
|
|
926
|
-
(this.milesStoneRadius) + 'px;border-right-width:' + this.milesStoneRadius + 'px; border-left-width:' +
|
|
927
|
-
this.milesStoneRadius + 'px; border-top-width:' + this.milesStoneRadius + 'px;"></div></div>';
|
|
890
|
+
var milestoneTemplate = '<div class="' + cls.parentMilestone + '" style="width:' + ((this.parent.renderBaseline ? this.taskBarHeight - 3 : this.taskBarHeight - 7)) + 'px;height:' +
|
|
891
|
+
((this.parent.renderBaseline ? this.taskBarHeight - 3 : this.taskBarHeight - 7)) + 'px;position:absolute;transform: rotate(45deg);top:' + (this.parent.rowHeight > 40 ? 0 : 2) + 'px;left:' + (this.parent.renderBaseline ? 2 : 1) + 'px;"> </div>';
|
|
928
892
|
template[0].appendChild([].slice.call(progressBarInnerDiv)[0]);
|
|
929
893
|
parentTaskbarNode = data.ganttProperties.isMilestone ?
|
|
930
894
|
this.createDivElement(data.ganttProperties.isAutoSchedule ? milestoneTemplate : '') : template;
|
|
@@ -1301,8 +1265,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1301
1265
|
this.milestoneMarginTop = Math.floor((this.parent.rowHeight - this.milestoneHeight) / 2);
|
|
1302
1266
|
this.milesStoneRadius = Math.floor((this.milestoneHeight) / 2);
|
|
1303
1267
|
this.baselineTop = -(Math.floor((this.parent.rowHeight - (this.taskBarHeight + this.taskBarMarginTop))) - 4);
|
|
1304
|
-
this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) :
|
|
1305
|
-
this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2));
|
|
1268
|
+
this.connectorPointWidth = this.parent.isAdaptive ? Math.round(this.taskBarHeight / 2) : 10;
|
|
1269
|
+
this.connectorPointMargin = Math.floor((this.taskBarHeight / 2) - (this.connectorPointWidth / 2)) - 1;
|
|
1306
1270
|
};
|
|
1307
1271
|
/**
|
|
1308
1272
|
* Function used to refresh Gantt rows.
|
|
@@ -1371,7 +1335,6 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1371
1335
|
var tempTemplateData = this.parent.currentViewData[i];
|
|
1372
1336
|
if (this.parent.viewType === 'ResourceView') {
|
|
1373
1337
|
if (this.parent.editModule && this.parent.editModule.isResourceTaskDeleted || this.parent.isFromOnPropertyChange) {
|
|
1374
|
-
this.parent.initialChartRowElements = this.parent.ganttChartModule.getChartRows();
|
|
1375
1338
|
this.parent.editModule.isResourceTaskDeleted = false;
|
|
1376
1339
|
}
|
|
1377
1340
|
if (!tempTemplateData.expanded && this.parent.enableMultiTaskbar) {
|
|
@@ -1390,11 +1353,12 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1390
1353
|
}
|
|
1391
1354
|
}
|
|
1392
1355
|
(_a = this.ganttChartTableBody).replaceChildren.apply(_a, dupChartBody.childNodes);
|
|
1356
|
+
this.parent.initialChartRowElements = this.parent.ganttChartModule.getChartRows();
|
|
1393
1357
|
}
|
|
1394
1358
|
this.parent.renderTemplates();
|
|
1395
1359
|
this.triggerQueryTaskbarInfo();
|
|
1396
1360
|
this.parent.modifiedRecords = [];
|
|
1397
|
-
if (this.parent.viewType
|
|
1361
|
+
if (this.parent.viewType == 'ResourceView' && this.parent.showOverAllocation) {
|
|
1398
1362
|
this.updateOverlapped();
|
|
1399
1363
|
}
|
|
1400
1364
|
if (collapsedResourceRecord.length) {
|
|
@@ -1467,7 +1431,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1467
1431
|
else if (this.templateData.ganttProperties.isMilestone) {
|
|
1468
1432
|
var milestoneTemplateNode = this.getMilestoneNode(i, taskbarContainerNode);
|
|
1469
1433
|
if (milestoneTemplateNode && milestoneTemplateNode.length > 0) {
|
|
1470
|
-
|
|
1434
|
+
append(milestoneTemplateNode, taskbarContainerNode[0]);
|
|
1471
1435
|
}
|
|
1472
1436
|
if (this.parent.renderBaseline && this.templateData.ganttProperties.baselineStartDate &&
|
|
1473
1437
|
this.templateData.ganttProperties.baselineEndDate) {
|
|
@@ -1644,9 +1608,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1644
1608
|
var classCollections = this.getClassName(args);
|
|
1645
1609
|
if (args.taskbarType === 'Milestone') {
|
|
1646
1610
|
args.milestoneColor = taskbarElement.querySelector(classCollections[0]) ?
|
|
1647
|
-
getComputedStyle(taskbarElement.querySelector(classCollections[0])).
|
|
1611
|
+
getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor : null;
|
|
1648
1612
|
args.baselineColor = trElement.querySelector(classCollections[1]) ?
|
|
1649
|
-
getComputedStyle(trElement.querySelector(classCollections[1])).
|
|
1613
|
+
getComputedStyle(trElement.querySelector(classCollections[1])).backgroundColor :
|
|
1650
1614
|
(trElement.querySelector('.' + cls.baselineBar) ? getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).backgroundColor : null);
|
|
1651
1615
|
}
|
|
1652
1616
|
else if (taskbarElement) {
|
|
@@ -1714,14 +1678,12 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1714
1678
|
}
|
|
1715
1679
|
if (args.taskbarType === 'Milestone') {
|
|
1716
1680
|
if (taskbarElement.querySelector(classCollections[0]) &&
|
|
1717
|
-
getComputedStyle(taskbarElement.querySelector(classCollections[0])).
|
|
1718
|
-
taskbarElement.querySelector(classCollections[0]).style.
|
|
1719
|
-
taskbarElement.querySelector('.' + cls.milestoneBottom).style.borderTopColor = args.milestoneColor;
|
|
1681
|
+
getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.milestoneColor) {
|
|
1682
|
+
taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.milestoneColor;
|
|
1720
1683
|
}
|
|
1721
1684
|
if (trElement.querySelector(classCollections[1]) &&
|
|
1722
|
-
getComputedStyle(trElement.querySelector(classCollections[1])).
|
|
1723
|
-
trElement.querySelector(classCollections[1]).style.
|
|
1724
|
-
trElement.querySelector('.' + cls.baselineMilestoneBottom).style.borderTopColor = args.baselineColor;
|
|
1685
|
+
getComputedStyle(trElement.querySelector(classCollections[1])).backgroundColor !== args.baselineColor) {
|
|
1686
|
+
trElement.querySelector(classCollections[1]).style.backgroundColor = args.baselineColor;
|
|
1725
1687
|
}
|
|
1726
1688
|
if (trElement.querySelector('.' + cls.baselineBar) &&
|
|
1727
1689
|
getComputedStyle(trElement.querySelector('.' + cls.baselineBar)).borderTopColor !== args.baselineColor) {
|
|
@@ -1802,9 +1764,9 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1802
1764
|
ChartRows.prototype.getClassName = function (args) {
|
|
1803
1765
|
var classCollection = [];
|
|
1804
1766
|
classCollection.push('.' + (args.taskbarType === 'ParentTask' ?
|
|
1805
|
-
cls.traceParentTaskBar : args.taskbarType === 'ChildTask' ? cls.traceChildTaskBar : cls.
|
|
1767
|
+
cls.traceParentTaskBar : args.taskbarType === 'ChildTask' ? cls.traceChildTaskBar : cls.traceMilestone));
|
|
1806
1768
|
classCollection.push('.' + (args.taskbarType === 'ParentTask' ?
|
|
1807
|
-
cls.traceParentProgressBar : args.taskbarType === 'ChildTask' ? cls.traceChildProgressBar : cls.
|
|
1769
|
+
cls.traceParentProgressBar : args.taskbarType === 'ChildTask' ? cls.traceChildProgressBar : cls.baselineMilestoneContainer));
|
|
1808
1770
|
return classCollection;
|
|
1809
1771
|
};
|
|
1810
1772
|
/**
|
|
@@ -1817,7 +1779,7 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
1817
1779
|
ChartRows.prototype.templateCompiler = function (template) {
|
|
1818
1780
|
if (!isNullOrUndefined(template) && template !== '') {
|
|
1819
1781
|
try {
|
|
1820
|
-
if (document.querySelectorAll(template).length) {
|
|
1782
|
+
if (typeof template !== 'function' && document.querySelectorAll(template).length) {
|
|
1821
1783
|
return compile(document.querySelector(template).innerHTML.trim(), this.parent);
|
|
1822
1784
|
}
|
|
1823
1785
|
else {
|
|
@@ -1,18 +1,41 @@
|
|
|
1
1
|
import { Gantt } from '../base/gantt';
|
|
2
2
|
import { IGanttData, IConnectorLineObject, IPredecessor } from '../base/interface';
|
|
3
|
+
import { SvgRenderer } from '@syncfusion/ej2-svg-base';
|
|
3
4
|
/**
|
|
4
5
|
* To render the connector line in Gantt
|
|
5
6
|
*/
|
|
6
7
|
export declare class ConnectorLine {
|
|
8
|
+
private transform;
|
|
9
|
+
private connectorLinePath;
|
|
10
|
+
private arrowPath;
|
|
11
|
+
private taskLineValue;
|
|
12
|
+
private x1;
|
|
13
|
+
private x2;
|
|
14
|
+
private x3;
|
|
15
|
+
private x4;
|
|
16
|
+
private y1;
|
|
17
|
+
private y2;
|
|
18
|
+
private y3;
|
|
19
|
+
private y4;
|
|
20
|
+
private manualParent;
|
|
21
|
+
private manualChild;
|
|
22
|
+
private point1;
|
|
23
|
+
private point2;
|
|
7
24
|
private parent;
|
|
8
25
|
dependencyViewContainer: HTMLElement;
|
|
9
26
|
private lineColor;
|
|
10
27
|
private lineStroke;
|
|
11
28
|
tooltipTable: HTMLElement;
|
|
29
|
+
renderer: SvgRenderer;
|
|
30
|
+
private connectorId;
|
|
12
31
|
/**
|
|
13
32
|
* @hidden
|
|
14
33
|
*/
|
|
15
34
|
expandedRecords: IGanttData[];
|
|
35
|
+
svgObject: Element;
|
|
36
|
+
private connectorPath;
|
|
37
|
+
private arrowlinePath;
|
|
38
|
+
private groupObject;
|
|
16
39
|
constructor(ganttObj?: Gantt);
|
|
17
40
|
/**
|
|
18
41
|
* To get connector line gap.
|