devexpress-gantt 4.1.19 → 4.1.20
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/dist/dx-gantt.css +2 -2
- package/dist/dx-gantt.js +39 -15
- package/dist/dx-gantt.min.css +2 -2
- package/dist/dx-gantt.min.js +5 -5
- package/package.json +1 -1
package/dist/dx-gantt.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt)
|
|
3
|
-
* Version: 4.1.
|
|
4
|
-
* Build date: Tue Apr
|
|
3
|
+
* Version: 4.1.20
|
|
4
|
+
* Build date: Tue Apr 12 2022
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
package/dist/dx-gantt.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt)
|
|
3
|
-
* Version: 4.1.
|
|
4
|
-
* Build date: Tue Apr
|
|
3
|
+
* Version: 4.1.20
|
|
4
|
+
* Build date: Tue Apr 12 2022
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|
|
@@ -3157,7 +3157,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3157
3157
|
var topTaskRightCenter = this.getTaskRightCenter(topTaskPoint, topTaskIndex);
|
|
3158
3158
|
var isBottomMilestone = this.getTask(bottomTaskIndex).isMilestone();
|
|
3159
3159
|
var bottomTaskTopCenter = this.getTaskTopCenter(bottomTaskPoint, bottomTaskIndex);
|
|
3160
|
-
var endPointIndent =
|
|
3160
|
+
var endPointIndent = this.getHorizontalIndentFromTaskEdge(bottomTaskIndex, shiftEndPointToRight);
|
|
3161
3161
|
result.push(new point_1.Point(Math.floor(topTaskRightCenter.x), Math.floor(topTaskRightCenter.y)));
|
|
3162
3162
|
result.push(new point_1.Point(Math.floor(isBottomMilestone ? bottomTaskTopCenter.x : bottomTaskPoint.x + endPointIndent), Math.floor(result[0].y)));
|
|
3163
3163
|
result.push(new point_1.Point(Math.floor(result[1].x), Math.floor(bottomTaskTopCenter.y)));
|
|
@@ -3202,7 +3202,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3202
3202
|
var topTaskBottomCenter = this.getTaskBottomCenter(topTaskPoint, topTaskIndex);
|
|
3203
3203
|
var isTopMilestone = this.getTask(topTaskIndex).isMilestone();
|
|
3204
3204
|
var bottomTaskRightCenter = this.getTaskRightCenter(bottomTaskPoint, bottomTaskIndex);
|
|
3205
|
-
var startPointIndent =
|
|
3205
|
+
var startPointIndent = this.getHorizontalIndentFromTaskEdge(topTaskIndex, shiftStartPointToRight);
|
|
3206
3206
|
result.push(new point_1.Point(Math.floor(isTopMilestone ? topTaskBottomCenter.x : topTaskPoint.x + startPointIndent), Math.floor(topTaskBottomCenter.y)));
|
|
3207
3207
|
result.push(new point_1.Point(Math.floor(result[0].x), Math.floor(bottomTaskRightCenter.y)));
|
|
3208
3208
|
result.push(new point_1.Point(Math.floor(bottomTaskRightCenter.x), Math.floor(bottomTaskRightCenter.y)));
|
|
@@ -3215,7 +3215,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3215
3215
|
var topTaskBottomCenter = this.getTaskBottomCenter(topTaskPoint, topTaskIndex);
|
|
3216
3216
|
var isTopMilestone = this.getTask(topTaskIndex).isMilestone();
|
|
3217
3217
|
var bottomTaskLeftCenter = this.getTaskLeftCenter(bottomTaskPoint, bottomTaskIndex);
|
|
3218
|
-
var startPointIndent =
|
|
3218
|
+
var startPointIndent = this.getHorizontalIndentFromTaskEdge(topTaskIndex, shiftStartPointToRight);
|
|
3219
3219
|
result.push(new point_1.Point(Math.floor(isTopMilestone ? topTaskBottomCenter.x : topTaskPoint.x + startPointIndent), Math.floor(topTaskBottomCenter.y)));
|
|
3220
3220
|
result.push(new point_1.Point(Math.floor(result[0].x), Math.floor(bottomTaskLeftCenter.y)));
|
|
3221
3221
|
result.push(new point_1.Point(Math.floor(bottomTaskLeftCenter.x), Math.floor(bottomTaskLeftCenter.y)));
|
|
@@ -3228,7 +3228,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3228
3228
|
var topTaskLeftCenter = this.getTaskLeftCenter(topTaskPoint, topTaskIndex);
|
|
3229
3229
|
var bottomTaskTopCenter = this.getTaskTopCenter(bottomTaskPoint, bottomTaskIndex);
|
|
3230
3230
|
var isBottomMilestone = this.getTask(bottomTaskIndex).isMilestone();
|
|
3231
|
-
var endPointIndent =
|
|
3231
|
+
var endPointIndent = this.getHorizontalIndentFromTaskEdge(bottomTaskIndex, shiftEndPointToRight);
|
|
3232
3232
|
result.push(new point_1.Point(Math.floor(topTaskLeftCenter.x), Math.floor(topTaskLeftCenter.y)));
|
|
3233
3233
|
result.push(new point_1.Point(Math.floor(isBottomMilestone ? bottomTaskTopCenter.x : bottomTaskPoint.x + endPointIndent), Math.floor(result[0].y)));
|
|
3234
3234
|
result.push(new point_1.Point(Math.floor(result[1].x), Math.floor(bottomTaskTopCenter.y)));
|
|
@@ -3292,6 +3292,12 @@ var GridLayoutCalculator = (function () {
|
|
|
3292
3292
|
var isMilestone = viewItem.task.isMilestone() && !viewItem.isCustom;
|
|
3293
3293
|
return isMilestone ? this.getTaskHeight(index) * (Math.sqrt(2) - 1) / 2 : 0;
|
|
3294
3294
|
};
|
|
3295
|
+
GridLayoutCalculator.prototype.getHorizontalIndentFromTaskEdge = function (index, shiftToRight) {
|
|
3296
|
+
if (shiftToRight === void 0) { shiftToRight = false; }
|
|
3297
|
+
var taskWidth = this.getTaskWidth(index);
|
|
3298
|
+
var indentFromEdge = this.minLineLength < taskWidth / 3 ? this.minLineLength : 0.2 * taskWidth;
|
|
3299
|
+
return shiftToRight ? taskWidth - indentFromEdge : indentFromEdge;
|
|
3300
|
+
};
|
|
3295
3301
|
GridLayoutCalculator.prototype.getRenderedRowColumnIndices = function (scrollPos, isVertical) {
|
|
3296
3302
|
var visibleAreaSizeValue = isVertical ? this.visibleTaskAreaSize.height : this.visibleTaskAreaSize.width;
|
|
3297
3303
|
var firstVisibleIndex = isVertical ? this.getFirstVisibleGridCellIndex(scrollPos, this.tickSize.height) : this.getFirstScaleVisibleIndex(scrollPos);
|
|
@@ -5186,7 +5192,7 @@ var TaskEditController = (function () {
|
|
|
5186
5192
|
this.baseElement.className = this.baseElement.className + " milestone";
|
|
5187
5193
|
else {
|
|
5188
5194
|
if (!this.isTaskUpdateAllowed())
|
|
5189
|
-
this.baseElement.className = this.baseElement.className + "
|
|
5195
|
+
this.baseElement.className = this.baseElement.className + " " + TaskEditController.CLASSNAMES.TASK_EDIT_HIDE_UPDATING;
|
|
5190
5196
|
if (this.viewItem.isCustom)
|
|
5191
5197
|
this.baseElement.classList.add(TaskEditController.CLASSNAMES.TASK_EDIT_BOX_CUSTOM);
|
|
5192
5198
|
}
|
|
@@ -5540,7 +5546,8 @@ var TaskEditController = (function () {
|
|
|
5540
5546
|
TASK_EDIT_FRAME_SUCCESSOR: "dx-gantt-task-edit-frame-successor",
|
|
5541
5547
|
TASK_EDIT_SUCCESSOR_DEPENDENCY_RIGTH: "dx-gantt-task-edit-successor-dependency-r",
|
|
5542
5548
|
TASK_EDIT_SUCCESSOR_DEPENDENCY_LEFT: "dx-gantt-task-edit-successor-dependency-l",
|
|
5543
|
-
TASK_EDIT_TOUCH: "dx-gantt-edit-touch"
|
|
5549
|
+
TASK_EDIT_TOUCH: "dx-gantt-edit-touch",
|
|
5550
|
+
TASK_EDIT_HIDE_UPDATING: "hide-updating"
|
|
5544
5551
|
};
|
|
5545
5552
|
return TaskEditController;
|
|
5546
5553
|
}());
|
|
@@ -16160,8 +16167,13 @@ var RenderHelper = (function () {
|
|
|
16160
16167
|
};
|
|
16161
16168
|
RenderHelper.prototype.createTaskArea = function (parent) {
|
|
16162
16169
|
this._taskArea = this._taskAreaRender.createTaskArea();
|
|
16170
|
+
this._taskArea.setAttribute("task-edit-enabled", this.isTaskUpdateAllowed().toString());
|
|
16163
16171
|
parent.appendChild(this._taskArea);
|
|
16164
16172
|
};
|
|
16173
|
+
RenderHelper.prototype.isTaskUpdateAllowed = function () {
|
|
16174
|
+
var settings = this.ganttViewSettings.editing;
|
|
16175
|
+
return settings.enabled && settings.allowTaskUpdate;
|
|
16176
|
+
};
|
|
16165
16177
|
RenderHelper.prototype.setSizeForTaskArea = function () {
|
|
16166
16178
|
var width = this.getTaskAreaWidth();
|
|
16167
16179
|
var height = this.getTaskAreaHeight();
|
|
@@ -17370,7 +17382,7 @@ var TaskAreaStateController = (function () {
|
|
|
17370
17382
|
this._pointers = {};
|
|
17371
17383
|
this._listener = listener;
|
|
17372
17384
|
this._listener.setHandler(TaskAreaStateEventNames_1.TaskAreaStateEventNames.STATE_EXIT, function () { _this.switchToDefaultState(); });
|
|
17373
|
-
this._listener.setHandler(TaskAreaStateEventNames_1.TaskAreaStateEventNames.GET_POINTERS_INFO, function () { return _this.getPointersInfo(); });
|
|
17385
|
+
this._listener.setHandler(TaskAreaStateEventNames_1.TaskAreaStateEventNames.GET_POINTERS_INFO, function (args) { return _this.getPointersInfo(args.triggerEvent); });
|
|
17374
17386
|
this._taskArea = taskArea;
|
|
17375
17387
|
this._cellSize = cellSize;
|
|
17376
17388
|
this.switchToDefaultState();
|
|
@@ -17502,7 +17514,10 @@ var TaskAreaStateController = (function () {
|
|
|
17502
17514
|
this.switchState(TaskAreaScrollState_1.TaskAreaScrollState);
|
|
17503
17515
|
break;
|
|
17504
17516
|
case Enums_1.TaskAreaEventSource.TaskEdit_Frame:
|
|
17505
|
-
this.
|
|
17517
|
+
if (!this.isTaskUpdateDisabled())
|
|
17518
|
+
this.switchState(TaskMoveState_1.TaskMoveState);
|
|
17519
|
+
else
|
|
17520
|
+
this.switchState(TaskAreaScrollState_1.TaskAreaScrollState);
|
|
17506
17521
|
break;
|
|
17507
17522
|
case Enums_1.TaskAreaEventSource.TaskEdit_Progress:
|
|
17508
17523
|
case Enums_1.TaskAreaEventSource.TaskEdit_Start:
|
|
@@ -17524,13 +17539,16 @@ var TaskAreaStateController = (function () {
|
|
|
17524
17539
|
TaskAreaStateController.prototype.checkEventInTaskEditFrameArea = function (evt) {
|
|
17525
17540
|
var _a, _b;
|
|
17526
17541
|
var frame = this.getTaskEditFrameElement();
|
|
17527
|
-
if (!frame)
|
|
17542
|
+
if (this.isTaskUpdateDisabled() || !frame)
|
|
17528
17543
|
return false;
|
|
17529
17544
|
var eventX = (evt === null || evt === void 0 ? void 0 : evt.clientX) || ((_a = evt === null || evt === void 0 ? void 0 : evt.touches[0]) === null || _a === void 0 ? void 0 : _a.clientX);
|
|
17530
17545
|
var eventY = (evt === null || evt === void 0 ? void 0 : evt.clientY) || ((_b = evt === null || evt === void 0 ? void 0 : evt.touches[0]) === null || _b === void 0 ? void 0 : _b.clientY);
|
|
17531
17546
|
var rect = frame.getBoundingClientRect();
|
|
17532
17547
|
return eventX >= rect.left && eventX <= rect.left + rect.width && eventY >= rect.top && eventY <= rect.top + rect.height;
|
|
17533
17548
|
};
|
|
17549
|
+
TaskAreaStateController.prototype.isTaskUpdateDisabled = function () {
|
|
17550
|
+
return this._taskArea.getAttribute("task-edit-enabled") === "false";
|
|
17551
|
+
};
|
|
17534
17552
|
TaskAreaStateController.prototype.isInTaskArea = function (evt) {
|
|
17535
17553
|
return dom_1.DomUtils.isItParent(this._taskArea, evt_1.EvtUtils.getEventSource(evt));
|
|
17536
17554
|
};
|
|
@@ -17541,7 +17559,8 @@ var TaskAreaStateController = (function () {
|
|
|
17541
17559
|
var key = evt.pointerId;
|
|
17542
17560
|
this._pointers[key] = {
|
|
17543
17561
|
pageX: evt.pageX,
|
|
17544
|
-
pageY: evt.pageY
|
|
17562
|
+
pageY: evt.pageY,
|
|
17563
|
+
pointerType: evt.pointerType
|
|
17545
17564
|
};
|
|
17546
17565
|
};
|
|
17547
17566
|
TaskAreaStateController.prototype._clearPointerInfo = function (evt) {
|
|
@@ -17551,13 +17570,18 @@ var TaskAreaStateController = (function () {
|
|
|
17551
17570
|
TaskAreaStateController.prototype.isTouchEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isTouchEvent(evt); };
|
|
17552
17571
|
TaskAreaStateController.prototype.isPointerEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isPointerEvent(evt); };
|
|
17553
17572
|
TaskAreaStateController.prototype._getActivePointersCount = function (evt) {
|
|
17573
|
+
var _this = this;
|
|
17554
17574
|
if (this.isTouchEvent(evt))
|
|
17555
17575
|
return evt.touches.length;
|
|
17556
|
-
return Object.keys(this._pointers).length;
|
|
17576
|
+
return Object.keys(this._pointers).filter(function (p) { return _this._pointers[p].pointerType === evt.pointerType; }).length;
|
|
17557
17577
|
};
|
|
17558
|
-
TaskAreaStateController.prototype.getPointersInfo = function () {
|
|
17578
|
+
TaskAreaStateController.prototype.getPointersInfo = function (evt) {
|
|
17559
17579
|
var _this = this;
|
|
17560
|
-
|
|
17580
|
+
var pointerType = evt === null || evt === void 0 ? void 0 : evt.pointerType;
|
|
17581
|
+
var pointers = Object.keys(this._pointers).map(function (k) { return _this._pointers[k]; });
|
|
17582
|
+
if (pointerType)
|
|
17583
|
+
pointers = pointers.filter(function (p) { return p.pointerType === pointerType; });
|
|
17584
|
+
return pointers;
|
|
17561
17585
|
};
|
|
17562
17586
|
TaskAreaStateController.prototype._canStartDrag = function (evt) {
|
|
17563
17587
|
if (this._getActivePointersCount(evt) > 1)
|
package/dist/dx-gantt.min.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* DevExpress Gantt (dx-gantt.min)
|
|
3
|
-
* Version: 4.1.
|
|
4
|
-
* Build date: Tue Apr
|
|
3
|
+
* Version: 4.1.20
|
|
4
|
+
* Build date: Tue Apr 12 2022
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
|
|
7
7
|
* Read about DevExpress licensing here: https://www.devexpress.com/Support/EULAs
|