@syncfusion/ej2-gantt 20.1.50 → 20.1.55
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 +29 -0
- 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 +80 -30
- package/dist/es6/ej2-gantt.es2015.js.map +1 -1
- package/dist/es6/ej2-gantt.es5.js +80 -30
- 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/edit.js +3 -0
- package/src/gantt/actions/filter.js +1 -1
- package/src/gantt/base/gantt-chart.js +1 -1
- package/src/gantt/base/gantt.js +3 -0
- package/src/gantt/base/tree-grid.js +1 -1
- package/src/gantt/export/export-helper.js +3 -0
- package/src/gantt/export/pdf-taskbar.d.ts +1 -0
- package/src/gantt/export/pdf-taskbar.js +36 -12
- package/src/gantt/renderer/chart-rows.js +16 -12
- package/src/gantt/renderer/nonworking-day.d.ts +1 -0
- package/src/gantt/renderer/nonworking-day.js +9 -0
- package/src/gantt/renderer/timeline.js +7 -3
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.1.
|
|
3
|
+
* version : 20.1.55
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-gantt@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-gantt@20.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-gantt@20.1.52",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512
|
|
5
|
+
"_integrity": "sha512-/wTVnjMzpT390P2JRzawyNbDFHg0Wpc8duptpxTelUIBcwZ0G4HhwiNBDmzn5bIyYRGeFHu71fEbDQCLqsMwFQ==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-gantt",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"/@syncfusion/ej2-react-gantt",
|
|
24
24
|
"/@syncfusion/ej2-vue-gantt"
|
|
25
25
|
],
|
|
26
|
-
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.1.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-gantt/-/ej2-gantt-20.1.52.tgz",
|
|
27
|
+
"_shasum": "3d1f066bd806ba43e8e6272345b12e2838cde804",
|
|
28
28
|
"_spec": "@syncfusion/ej2-gantt@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
},
|
|
36
36
|
"bundleDependencies": false,
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@syncfusion/ej2-base": "~20.1.
|
|
39
|
-
"@syncfusion/ej2-buttons": "~20.1.
|
|
40
|
-
"@syncfusion/ej2-calendars": "~20.1.
|
|
41
|
-
"@syncfusion/ej2-data": "~20.1.
|
|
42
|
-
"@syncfusion/ej2-dropdowns": "~20.1.
|
|
43
|
-
"@syncfusion/ej2-grids": "~20.1.
|
|
44
|
-
"@syncfusion/ej2-inputs": "~20.1.
|
|
45
|
-
"@syncfusion/ej2-layouts": "~20.1.
|
|
46
|
-
"@syncfusion/ej2-lists": "~20.1.
|
|
47
|
-
"@syncfusion/ej2-navigations": "~20.1.
|
|
48
|
-
"@syncfusion/ej2-popups": "~20.1.
|
|
49
|
-
"@syncfusion/ej2-richtexteditor": "~20.1.
|
|
50
|
-
"@syncfusion/ej2-treegrid": "~20.1.
|
|
38
|
+
"@syncfusion/ej2-base": "~20.1.55",
|
|
39
|
+
"@syncfusion/ej2-buttons": "~20.1.55",
|
|
40
|
+
"@syncfusion/ej2-calendars": "~20.1.55",
|
|
41
|
+
"@syncfusion/ej2-data": "~20.1.55",
|
|
42
|
+
"@syncfusion/ej2-dropdowns": "~20.1.55",
|
|
43
|
+
"@syncfusion/ej2-grids": "~20.1.55",
|
|
44
|
+
"@syncfusion/ej2-inputs": "~20.1.55",
|
|
45
|
+
"@syncfusion/ej2-layouts": "~20.1.55",
|
|
46
|
+
"@syncfusion/ej2-lists": "~20.1.55",
|
|
47
|
+
"@syncfusion/ej2-navigations": "~20.1.55",
|
|
48
|
+
"@syncfusion/ej2-popups": "~20.1.55",
|
|
49
|
+
"@syncfusion/ej2-richtexteditor": "~20.1.55",
|
|
50
|
+
"@syncfusion/ej2-treegrid": "~20.1.55"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
53
53
|
"description": "Essential JS 2 Gantt Component",
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"url": "git+https://github.com/syncfusion/ej2-gantt.git"
|
|
76
76
|
},
|
|
77
77
|
"typings": "index.d.ts",
|
|
78
|
-
"version": "20.1.
|
|
78
|
+
"version": "20.1.55",
|
|
79
79
|
"sideEffects": false
|
|
80
80
|
}
|
|
@@ -353,6 +353,9 @@ var Edit = /** @class */ (function () {
|
|
|
353
353
|
if (!isNullOrUndefined(this.parent.editModule) && ganttData) {
|
|
354
354
|
this.parent.isOnEdit = true;
|
|
355
355
|
this.validateUpdateValues(data, ganttData, true);
|
|
356
|
+
if (data[this.parent.taskFields.resourceInfo]) {
|
|
357
|
+
this.updateResourceRelatedFields(ganttData, 'resource');
|
|
358
|
+
}
|
|
356
359
|
var keys = Object.keys(data);
|
|
357
360
|
if (keys.indexOf(tasks.startDate) !== -1 || keys.indexOf(tasks.endDate) !== -1 ||
|
|
358
361
|
keys.indexOf(tasks.duration) !== -1) {
|
|
@@ -247,7 +247,7 @@ var Filter = /** @class */ (function () {
|
|
|
247
247
|
};
|
|
248
248
|
Filter.prototype.updateFilterMenuPosition = function (element, args) {
|
|
249
249
|
addClass([element], 'e-gantt');
|
|
250
|
-
document.
|
|
250
|
+
document.querySelector('#' + this.parent.controlId).appendChild(element);
|
|
251
251
|
var targetElement;
|
|
252
252
|
if (this.parent.showColumnMenu) {
|
|
253
253
|
targetElement = document.querySelector('#treeGrid' + this.parent.controlId + '_gridcontrol_colmenu_Filter');
|
|
@@ -963,7 +963,7 @@ var GanttChart = /** @class */ (function () {
|
|
|
963
963
|
this.parent.treeGrid.grid.notify('key-pressed', e);
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
if (!
|
|
966
|
+
if (!isInEditedState) {
|
|
967
967
|
if (nextElement) {
|
|
968
968
|
if ($target.classList.contains('e-rowcell')) {
|
|
969
969
|
this.manageFocus($target, 'remove', false);
|
package/src/gantt/base/gantt.js
CHANGED
|
@@ -261,7 +261,7 @@ var GanttTreeGrid = /** @class */ (function () {
|
|
|
261
261
|
return eventArgs;
|
|
262
262
|
};
|
|
263
263
|
GanttTreeGrid.prototype.treeActionComplete = function (args) {
|
|
264
|
-
var updatedArgs = extend({}, args
|
|
264
|
+
var updatedArgs = extend({}, args);
|
|
265
265
|
if (getValue('requestType', args) === 'sorting') {
|
|
266
266
|
this.parent.notify('updateModel', {});
|
|
267
267
|
deleteObject(updatedArgs, 'isFrozen');
|
|
@@ -257,6 +257,9 @@ var ExportHelper = /** @class */ (function () {
|
|
|
257
257
|
if (data[_this.parent.labelSettings.rightLabel]) {
|
|
258
258
|
taskbar.rightTaskLabel.value = data[_this.parent.labelSettings.rightLabel].toString();
|
|
259
259
|
}
|
|
260
|
+
if (data[_this.parent.labelSettings.taskLabel]) {
|
|
261
|
+
taskbar.taskLabel = data[_this.parent.labelSettings.taskLabel].toString();
|
|
262
|
+
}
|
|
260
263
|
var reduceLeft = ganttProp.isMilestone ? Math.floor(_this.parent.chartRowsModule.taskBarHeight / 2) + 33 : 33; // 33 indicates default timeline cell width
|
|
261
264
|
taskbar.rightTaskLabel.left = ganttProp.left + ganttProp.width + reduceLeft; // right label left value
|
|
262
265
|
taskbar.fontFamily = _this.ganttStyle.fontFamily;
|
|
@@ -79,6 +79,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
79
79
|
var progressFormat = new PdfStringFormat();
|
|
80
80
|
progressFormat.lineAlignment = PdfVerticalAlignment.Middle;
|
|
81
81
|
progressFormat.alignment = PdfTextAlignment.Right;
|
|
82
|
+
var isLabelString = false;
|
|
83
|
+
var updatedWidth;
|
|
84
|
+
if (/^[a-zA-Z]/.test(this.taskLabel)) {
|
|
85
|
+
isLabelString = true;
|
|
86
|
+
progressFormat.alignment = PdfTextAlignment.Left;
|
|
87
|
+
}
|
|
82
88
|
var pageIndex = -1;
|
|
83
89
|
if (!taskbar.isMilestone) {
|
|
84
90
|
var taskbarPen = new PdfPen(taskbar.taskBorderColor);
|
|
@@ -100,10 +106,14 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
100
106
|
}
|
|
101
107
|
else {
|
|
102
108
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
103
|
-
if (this.
|
|
109
|
+
if (this.isScheduledTask) {
|
|
104
110
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
105
|
-
if (!isNullOrUndefined(this.parent.
|
|
106
|
-
|
|
111
|
+
if (!isNullOrUndefined(this.parent.labelSettings.taskLabel) && !isNullOrUndefined(this.taskLabel)) {
|
|
112
|
+
updatedWidth = this.progressWidth;
|
|
113
|
+
if (isLabelString) {
|
|
114
|
+
updatedWidth = this.width;
|
|
115
|
+
}
|
|
116
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), startPoint.y + adjustHeight, pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
107
117
|
}
|
|
108
118
|
}
|
|
109
119
|
}
|
|
@@ -118,14 +128,16 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
118
128
|
this.isStartPoint = true;
|
|
119
129
|
}
|
|
120
130
|
var renderWidth = 0;
|
|
121
|
-
|
|
131
|
+
if (!isLabelString) {
|
|
132
|
+
this.width = this.width - (detail.totalWidth - (this.left - cumulativeWidth));
|
|
133
|
+
}
|
|
122
134
|
renderWidth = (detail.totalWidth - (this.left - cumulativeWidth));
|
|
123
135
|
if (!this.isScheduledTask && this.unscheduledTaskBy !== 'duration') {
|
|
124
136
|
this.drawUnscheduledTask(taskGraphics, startPoint, cumulativeWidth, adjustHeight);
|
|
125
137
|
}
|
|
126
138
|
else {
|
|
127
139
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(renderWidth), pixelToPoint(taskbar.height));
|
|
128
|
-
if (this.
|
|
140
|
+
if (this.isScheduledTask) {
|
|
129
141
|
var progressBoundsWidth = 0;
|
|
130
142
|
if (this.progressWidth <= renderWidth) {
|
|
131
143
|
progressBoundsWidth = this.progressWidth;
|
|
@@ -135,8 +147,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
135
147
|
}
|
|
136
148
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
|
|
137
149
|
this.progressWidth -= progressBoundsWidth;
|
|
138
|
-
if (this.
|
|
139
|
-
|
|
150
|
+
if (this.parent.labelSettings.taskLabel && !isNullOrUndefined(this.taskLabel)) {
|
|
151
|
+
updatedWidth = progressBoundsWidth;
|
|
152
|
+
if (isLabelString) {
|
|
153
|
+
updatedWidth = this.width;
|
|
154
|
+
}
|
|
155
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left - cumulativeWidth), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
140
156
|
}
|
|
141
157
|
}
|
|
142
158
|
}
|
|
@@ -153,8 +169,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
153
169
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.width), pixelToPoint(taskbar.height));
|
|
154
170
|
if (this.isScheduledTask) {
|
|
155
171
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left + 0.5), startPoint.y + adjustHeight, pixelToPoint(taskbar.progressWidth), pixelToPoint(taskbar.height));
|
|
156
|
-
if (this.
|
|
157
|
-
|
|
172
|
+
if (!isNullOrUndefined(this.taskLabel)) {
|
|
173
|
+
updatedWidth = this.progressWidth;
|
|
174
|
+
if (isLabelString) {
|
|
175
|
+
updatedWidth = this.width;
|
|
176
|
+
}
|
|
177
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
158
178
|
}
|
|
159
179
|
}
|
|
160
180
|
this.isCompleted = true;
|
|
@@ -168,7 +188,7 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
168
188
|
this.isStartPoint = true;
|
|
169
189
|
}
|
|
170
190
|
taskGraphics.drawRectangle(taskbarPen, taskBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(detail.totalWidth), pixelToPoint(taskbar.height));
|
|
171
|
-
if (this.
|
|
191
|
+
if (this.isScheduledTask) {
|
|
172
192
|
var progressBoundsWidth = 0;
|
|
173
193
|
if (this.progressWidth <= detail.totalWidth) {
|
|
174
194
|
progressBoundsWidth = this.progressWidth;
|
|
@@ -178,8 +198,12 @@ var PdfGanttTaskbarCollection = /** @class */ (function () {
|
|
|
178
198
|
}
|
|
179
199
|
taskGraphics.drawRectangle(progressPen, progressBrush, startPoint.x + pixelToPoint(taskbar.left) + 0.5, startPoint.y + adjustHeight, pixelToPoint(progressBoundsWidth), pixelToPoint(taskbar.height));
|
|
180
200
|
this.progressWidth -= progressBoundsWidth;
|
|
181
|
-
if (this.
|
|
182
|
-
|
|
201
|
+
if (!isNullOrUndefined(this.taskLabel)) {
|
|
202
|
+
updatedWidth = progressBoundsWidth;
|
|
203
|
+
if (isLabelString) {
|
|
204
|
+
updatedWidth = this.width;
|
|
205
|
+
}
|
|
206
|
+
taskGraphics.drawString(this.taskLabel.toString(), font, fontColor, fontBrush, startPoint.x + pixelToPoint(this.left), (startPoint.y + adjustHeight), pixelToPoint(updatedWidth), pixelToPoint(this.height), progressFormat);
|
|
183
207
|
}
|
|
184
208
|
}
|
|
185
209
|
this.isCompleted = false;
|
|
@@ -174,8 +174,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
174
174
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
175
175
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
176
176
|
}
|
|
177
|
-
if (labelString
|
|
178
|
-
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate') {
|
|
177
|
+
if (labelString.indexOf('null') === -1) {
|
|
178
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' && !this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
179
179
|
labelString = '';
|
|
180
180
|
}
|
|
181
181
|
if (isNaN(parseInt(labelString))) {
|
|
@@ -216,14 +216,16 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
216
216
|
data.ganttProperties.segments.length === 0))) {
|
|
217
217
|
if (template !== '' && !isNullOrUndefined(progressDiv) && progressDiv.length > 0) {
|
|
218
218
|
var templateElement = this.createDivElement(template)[0];
|
|
219
|
-
templateElement.appendChild(tempDiv);
|
|
220
|
-
progressDiv[0].appendChild(templateElement);
|
|
221
219
|
var childLabel = this.parent.labelSettings.taskLabel;
|
|
220
|
+
if (childLabel && childLabel['elementRef'])
|
|
221
|
+
templateElement.appendChild(tempDiv);
|
|
222
|
+
progressDiv[0].appendChild(templateElement);
|
|
222
223
|
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
|
|
223
|
-
!this.isTemplate(childLabel)
|
|
224
|
+
!this.isTemplate(childLabel) &&
|
|
225
|
+
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
224
226
|
progressDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
225
227
|
if (progressDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
226
|
-
childLabel && !childLabel['elementRef'])
|
|
228
|
+
childLabel && !childLabel['elementRef'] && tempDiv.innerHTML != '')
|
|
227
229
|
progressDiv[0].querySelectorAll('.e-task-label')[0].textContent = childLabel;
|
|
228
230
|
}
|
|
229
231
|
if (!isNullOrUndefined(taskbarInnerDiv) && taskbarInnerDiv.length > 0) {
|
|
@@ -810,8 +812,8 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
810
812
|
labelString = this.getTaskLabel(this.parent.labelSettings.taskLabel);
|
|
811
813
|
labelString = labelString === 'isCustomTemplate' ? this.parent.labelSettings.taskLabel : labelString;
|
|
812
814
|
}
|
|
813
|
-
if (labelString
|
|
814
|
-
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate') {
|
|
815
|
+
if (labelString.indexOf('null') === -1) {
|
|
816
|
+
if (this.getTaskLabel(this.parent.labelSettings.taskLabel) === 'isCustomTemplate' && !this.isTemplate(this.parent.labelSettings.taskLabel)) {
|
|
815
817
|
labelString = '';
|
|
816
818
|
}
|
|
817
819
|
if (isNaN(parseInt(labelString))) {
|
|
@@ -831,14 +833,16 @@ var ChartRows = /** @class */ (function (_super) {
|
|
|
831
833
|
this.taskBarHeight + 'px;">' + labelString + '</span>';
|
|
832
834
|
}
|
|
833
835
|
var labelElement = this.createDivElement(labelDiv)[0];
|
|
834
|
-
labelElement.appendChild(div);
|
|
835
|
-
progressBarInnerDiv[0].appendChild(labelElement);
|
|
836
836
|
var parentLabel = this.parent.labelSettings.taskLabel;
|
|
837
|
+
if (parentLabel && parentLabel['elementRef'])
|
|
838
|
+
labelElement.appendChild(div);
|
|
839
|
+
progressBarInnerDiv[0].appendChild(labelElement);
|
|
837
840
|
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent !== '' &&
|
|
838
|
-
!this.isTemplate(parentLabel)
|
|
841
|
+
!this.isTemplate(parentLabel) &&
|
|
842
|
+
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0])
|
|
839
843
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].children[0].remove();
|
|
840
844
|
if (progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent == '' &&
|
|
841
|
-
parentLabel && !parentLabel['elementRef'])
|
|
845
|
+
parentLabel && !parentLabel['elementRef'] && div.innerHTML != '')
|
|
842
846
|
progressBarInnerDiv[0].querySelectorAll('.e-task-label')[0].textContent = parentLabel;
|
|
843
847
|
}
|
|
844
848
|
var milestoneTemplate = '<div class="' + cls.parentMilestone + '" style="position:absolute;">' +
|
|
@@ -2,6 +2,7 @@ import { createElement, formatUnit, remove, isNullOrUndefined } from '@syncfusio
|
|
|
2
2
|
import * as cls from '../base/css-constants';
|
|
3
3
|
var NonWorkingDay = /** @class */ (function () {
|
|
4
4
|
function NonWorkingDay(gantt) {
|
|
5
|
+
this.weekendWidthUpdated = false;
|
|
5
6
|
this.parent = gantt;
|
|
6
7
|
this.nonworkingContainer = null;
|
|
7
8
|
this.holidayContainer = null;
|
|
@@ -141,6 +142,14 @@ var NonWorkingDay = /** @class */ (function () {
|
|
|
141
142
|
width = this.parent.dataOperation.getTaskWidth(start, tempEnd);
|
|
142
143
|
isFirstCell = false;
|
|
143
144
|
}
|
|
145
|
+
var sDate = new Date(startDate);
|
|
146
|
+
sDate.setDate(sDate.getDate() + 1);
|
|
147
|
+
if (sDate.getTimezoneOffset() != this.parent.timelineModule.timelineStartDate.getTimezoneOffset() && !this.weekendWidthUpdated) {
|
|
148
|
+
if (this.parent.timelineModule.bottomTier == 'Hour' && this.parent.timelineSettings.bottomTier.count === 1) {
|
|
149
|
+
width = width - this.parent.timelineSettings.timelineUnitSize;
|
|
150
|
+
this.weekendWidthUpdated = true;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
144
153
|
var weekendDiv = createElement('div', {
|
|
145
154
|
className: cls.weekend, styles: "left:" + left + "px;width:" + width + "px;height:100%;"
|
|
146
155
|
});
|
|
@@ -818,7 +818,7 @@ var Timeline = /** @class */ (function () {
|
|
|
818
818
|
// PDf export collection
|
|
819
819
|
var timelineCell = {};
|
|
820
820
|
timelineCell.startDate = new Date(startDate.getTime());
|
|
821
|
-
if (mode === 'Month' && tier === 'bottomTier' && (
|
|
821
|
+
if (mode === 'Month' && tier === 'bottomTier' && (count != 1) && scheduleDateCollection.length === 0) {
|
|
822
822
|
isFirstCell = true;
|
|
823
823
|
}
|
|
824
824
|
parentTr = this.getHeaterTemplateString(new Date(startDate.toString()), mode, tier, false, count, timelineCell, isFirstCell);
|
|
@@ -832,6 +832,10 @@ var Timeline = /** @class */ (function () {
|
|
|
832
832
|
}
|
|
833
833
|
isFirstCell = false;
|
|
834
834
|
startDate.setTime(newTime);
|
|
835
|
+
if (startDate.getHours() === 5 && count === 2 && tier === 'bottomTier' &&
|
|
836
|
+
this.parent.timelineSettings.bottomTier.unit === 'Hour') {
|
|
837
|
+
startDate.setTime(startDate.getTime() - (1000 * 60 * 60));
|
|
838
|
+
}
|
|
835
839
|
if (startDate >= endDate) {
|
|
836
840
|
/* eslint-disable-next-line */
|
|
837
841
|
parentTr = this.getHeaterTemplateString(scheduleDateCollection[scheduleDateCollection.length - 1], mode, tier, true, count, timelineCell);
|
|
@@ -952,12 +956,12 @@ var Timeline = /** @class */ (function () {
|
|
|
952
956
|
Timeline.prototype.checkDate = function (firstDay, lastDay, increment, count) {
|
|
953
957
|
var date = new Date(firstDay.getTime());
|
|
954
958
|
date.setTime(date.getTime() + increment);
|
|
955
|
-
if (((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
959
|
+
if (count !== 1 && ((date.getTime() - lastDay.getTime()) / (1000 * 60 * 60)) != count && (firstDay.getTimezoneOffset() !== date.getTimezoneOffset())) {
|
|
956
960
|
var diffCount = count - (date.getTime() - lastDay.getTime()) / (1000 * 60 * 60);
|
|
957
961
|
if (!this.parent.isInDst(date)) {
|
|
958
962
|
increment += (1000 * 60 * 60 * diffCount);
|
|
959
963
|
}
|
|
960
|
-
else if (this.parent.isInDst(date)) {
|
|
964
|
+
else if (this.parent.isInDst(date) && count !== 2) {
|
|
961
965
|
increment -= (1000 * 60 * 60 * diffCount);
|
|
962
966
|
}
|
|
963
967
|
}
|