devexpress-gantt 4.0.15 → 4.0.16
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.0.
|
|
4
|
-
* Build date: Tue Apr
|
|
3
|
+
* Version: 4.0.16
|
|
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.0.
|
|
4
|
-
* Build date: Tue Apr
|
|
3
|
+
* Version: 4.0.16
|
|
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
|
|
@@ -3156,7 +3156,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3156
3156
|
var topTaskRightCenter = this.getTaskRightCenter(topTaskPoint, topTaskIndex);
|
|
3157
3157
|
var isBottomMilestone = this.getTask(bottomTaskIndex).isMilestone();
|
|
3158
3158
|
var bottomTaskTopCenter = this.getTaskTopCenter(bottomTaskPoint, bottomTaskIndex);
|
|
3159
|
-
var endPointIndent =
|
|
3159
|
+
var endPointIndent = this.getHorizontalIndentFromTaskEdge(bottomTaskIndex, shiftEndPointToRight);
|
|
3160
3160
|
result.push(new point_1.Point(Math.floor(topTaskRightCenter.x), Math.floor(topTaskRightCenter.y)));
|
|
3161
3161
|
result.push(new point_1.Point(Math.floor(isBottomMilestone ? bottomTaskTopCenter.x : bottomTaskPoint.x + endPointIndent), Math.floor(result[0].y)));
|
|
3162
3162
|
result.push(new point_1.Point(Math.floor(result[1].x), Math.floor(bottomTaskTopCenter.y)));
|
|
@@ -3201,7 +3201,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3201
3201
|
var topTaskBottomCenter = this.getTaskBottomCenter(topTaskPoint, topTaskIndex);
|
|
3202
3202
|
var isTopMilestone = this.getTask(topTaskIndex).isMilestone();
|
|
3203
3203
|
var bottomTaskRightCenter = this.getTaskRightCenter(bottomTaskPoint, bottomTaskIndex);
|
|
3204
|
-
var startPointIndent =
|
|
3204
|
+
var startPointIndent = this.getHorizontalIndentFromTaskEdge(topTaskIndex, shiftStartPointToRight);
|
|
3205
3205
|
result.push(new point_1.Point(Math.floor(isTopMilestone ? topTaskBottomCenter.x : topTaskPoint.x + startPointIndent), Math.floor(topTaskBottomCenter.y)));
|
|
3206
3206
|
result.push(new point_1.Point(Math.floor(result[0].x), Math.floor(bottomTaskRightCenter.y)));
|
|
3207
3207
|
result.push(new point_1.Point(Math.floor(bottomTaskRightCenter.x), Math.floor(bottomTaskRightCenter.y)));
|
|
@@ -3214,7 +3214,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3214
3214
|
var topTaskBottomCenter = this.getTaskBottomCenter(topTaskPoint, topTaskIndex);
|
|
3215
3215
|
var isTopMilestone = this.getTask(topTaskIndex).isMilestone();
|
|
3216
3216
|
var bottomTaskLeftCenter = this.getTaskLeftCenter(bottomTaskPoint, bottomTaskIndex);
|
|
3217
|
-
var startPointIndent =
|
|
3217
|
+
var startPointIndent = this.getHorizontalIndentFromTaskEdge(topTaskIndex, shiftStartPointToRight);
|
|
3218
3218
|
result.push(new point_1.Point(Math.floor(isTopMilestone ? topTaskBottomCenter.x : topTaskPoint.x + startPointIndent), Math.floor(topTaskBottomCenter.y)));
|
|
3219
3219
|
result.push(new point_1.Point(Math.floor(result[0].x), Math.floor(bottomTaskLeftCenter.y)));
|
|
3220
3220
|
result.push(new point_1.Point(Math.floor(bottomTaskLeftCenter.x), Math.floor(bottomTaskLeftCenter.y)));
|
|
@@ -3227,7 +3227,7 @@ var GridLayoutCalculator = (function () {
|
|
|
3227
3227
|
var topTaskLeftCenter = this.getTaskLeftCenter(topTaskPoint, topTaskIndex);
|
|
3228
3228
|
var bottomTaskTopCenter = this.getTaskTopCenter(bottomTaskPoint, bottomTaskIndex);
|
|
3229
3229
|
var isBottomMilestone = this.getTask(bottomTaskIndex).isMilestone();
|
|
3230
|
-
var endPointIndent =
|
|
3230
|
+
var endPointIndent = this.getHorizontalIndentFromTaskEdge(bottomTaskIndex, shiftEndPointToRight);
|
|
3231
3231
|
result.push(new point_1.Point(Math.floor(topTaskLeftCenter.x), Math.floor(topTaskLeftCenter.y)));
|
|
3232
3232
|
result.push(new point_1.Point(Math.floor(isBottomMilestone ? bottomTaskTopCenter.x : bottomTaskPoint.x + endPointIndent), Math.floor(result[0].y)));
|
|
3233
3233
|
result.push(new point_1.Point(Math.floor(result[1].x), Math.floor(bottomTaskTopCenter.y)));
|
|
@@ -3291,6 +3291,12 @@ var GridLayoutCalculator = (function () {
|
|
|
3291
3291
|
var isMilestone = viewItem.task.isMilestone() && !viewItem.isCustom;
|
|
3292
3292
|
return isMilestone ? this.getTaskHeight(index) * (Math.sqrt(2) - 1) / 2 : 0;
|
|
3293
3293
|
};
|
|
3294
|
+
GridLayoutCalculator.prototype.getHorizontalIndentFromTaskEdge = function (index, shiftToRight) {
|
|
3295
|
+
if (shiftToRight === void 0) { shiftToRight = false; }
|
|
3296
|
+
var taskWidth = this.getTaskWidth(index);
|
|
3297
|
+
var indentFromEdge = this.minLineLength < taskWidth / 3 ? this.minLineLength : 0.2 * taskWidth;
|
|
3298
|
+
return shiftToRight ? taskWidth - indentFromEdge : indentFromEdge;
|
|
3299
|
+
};
|
|
3294
3300
|
GridLayoutCalculator.prototype.getRenderedRowColumnIndices = function (scrollPos, isVertical) {
|
|
3295
3301
|
var visibleAreaSizeValue = isVertical ? this.visibleTaskAreaSize.height : this.visibleTaskAreaSize.width;
|
|
3296
3302
|
var firstVisibleIndex = isVertical ? this.getFirstVisibleGridCellIndex(scrollPos, this.tickSize.height) : this.getFirstScaleVisibleIndex(scrollPos);
|
|
@@ -5267,7 +5273,7 @@ var TaskEditController = (function () {
|
|
|
5267
5273
|
this.baseElement.className = this.baseElement.className + " milestone";
|
|
5268
5274
|
else {
|
|
5269
5275
|
if (!this.isTaskUpdateAllowed())
|
|
5270
|
-
this.baseElement.className = this.baseElement.className + "
|
|
5276
|
+
this.baseElement.className = this.baseElement.className + " " + TaskEditController.CLASSNAMES.TASK_EDIT_HIDE_UPDATING;
|
|
5271
5277
|
if (this.viewItem.isCustom)
|
|
5272
5278
|
this.baseElement.classList.add(TaskEditController.CLASSNAMES.TASK_EDIT_BOX_CUSTOM);
|
|
5273
5279
|
}
|
|
@@ -5621,7 +5627,8 @@ var TaskEditController = (function () {
|
|
|
5621
5627
|
TASK_EDIT_FRAME_SUCCESSOR: "dx-gantt-task-edit-frame-successor",
|
|
5622
5628
|
TASK_EDIT_SUCCESSOR_DEPENDENCY_RIGTH: "dx-gantt-task-edit-successor-dependency-r",
|
|
5623
5629
|
TASK_EDIT_SUCCESSOR_DEPENDENCY_LEFT: "dx-gantt-task-edit-successor-dependency-l",
|
|
5624
|
-
TASK_EDIT_TOUCH: "dx-gantt-edit-touch"
|
|
5630
|
+
TASK_EDIT_TOUCH: "dx-gantt-edit-touch",
|
|
5631
|
+
TASK_EDIT_HIDE_UPDATING: "hide-updating"
|
|
5625
5632
|
};
|
|
5626
5633
|
return TaskEditController;
|
|
5627
5634
|
}());
|
|
@@ -16055,8 +16062,13 @@ var RenderHelper = (function () {
|
|
|
16055
16062
|
};
|
|
16056
16063
|
RenderHelper.prototype.createTaskArea = function (parent) {
|
|
16057
16064
|
this._taskArea = this._taskAreaRender.createTaskArea();
|
|
16065
|
+
this._taskArea.setAttribute("task-edit-enabled", this.isTaskUpdateAllowed().toString());
|
|
16058
16066
|
parent.appendChild(this._taskArea);
|
|
16059
16067
|
};
|
|
16068
|
+
RenderHelper.prototype.isTaskUpdateAllowed = function () {
|
|
16069
|
+
var settings = this.ganttViewSettings.editing;
|
|
16070
|
+
return settings.enabled && settings.allowTaskUpdate;
|
|
16071
|
+
};
|
|
16060
16072
|
RenderHelper.prototype.setSizeForTaskArea = function () {
|
|
16061
16073
|
var width = this.getTaskAreaWidth();
|
|
16062
16074
|
var height = this.getTaskAreaHeight();
|
|
@@ -17204,7 +17216,7 @@ var TaskAreaStateController = (function () {
|
|
|
17204
17216
|
this._pointers = {};
|
|
17205
17217
|
this._listener = listener;
|
|
17206
17218
|
this._listener.setHandler(TaskAreaStateEventNames_1.TaskAreaStateEventNames.STATE_EXIT, function () { _this.switchToDefaultState(); });
|
|
17207
|
-
this._listener.setHandler(TaskAreaStateEventNames_1.TaskAreaStateEventNames.GET_POINTERS_INFO, function () { return _this.getPointersInfo(); });
|
|
17219
|
+
this._listener.setHandler(TaskAreaStateEventNames_1.TaskAreaStateEventNames.GET_POINTERS_INFO, function (args) { return _this.getPointersInfo(args.triggerEvent); });
|
|
17208
17220
|
this._taskArea = taskArea;
|
|
17209
17221
|
this._cellSize = cellSize;
|
|
17210
17222
|
this.switchToDefaultState();
|
|
@@ -17336,7 +17348,10 @@ var TaskAreaStateController = (function () {
|
|
|
17336
17348
|
this.switchState(TaskAreaScrollState_1.TaskAreaScrollState);
|
|
17337
17349
|
break;
|
|
17338
17350
|
case Enums_1.TaskAreaEventSource.TaskEdit_Frame:
|
|
17339
|
-
this.
|
|
17351
|
+
if (!this.isTaskUpdateDisabled())
|
|
17352
|
+
this.switchState(TaskMoveState_1.TaskMoveState);
|
|
17353
|
+
else
|
|
17354
|
+
this.switchState(TaskAreaScrollState_1.TaskAreaScrollState);
|
|
17340
17355
|
break;
|
|
17341
17356
|
case Enums_1.TaskAreaEventSource.TaskEdit_Progress:
|
|
17342
17357
|
case Enums_1.TaskAreaEventSource.TaskEdit_Start:
|
|
@@ -17358,13 +17373,16 @@ var TaskAreaStateController = (function () {
|
|
|
17358
17373
|
TaskAreaStateController.prototype.checkEventInTaskEditFrameArea = function (evt) {
|
|
17359
17374
|
var _a, _b;
|
|
17360
17375
|
var frame = this.getTaskEditFrameElement();
|
|
17361
|
-
if (!frame)
|
|
17376
|
+
if (this.isTaskUpdateDisabled() || !frame)
|
|
17362
17377
|
return false;
|
|
17363
17378
|
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);
|
|
17364
17379
|
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);
|
|
17365
17380
|
var rect = frame.getBoundingClientRect();
|
|
17366
17381
|
return eventX >= rect.left && eventX <= rect.left + rect.width && eventY >= rect.top && eventY <= rect.top + rect.height;
|
|
17367
17382
|
};
|
|
17383
|
+
TaskAreaStateController.prototype.isTaskUpdateDisabled = function () {
|
|
17384
|
+
return this._taskArea.getAttribute("task-edit-enabled") === "false";
|
|
17385
|
+
};
|
|
17368
17386
|
TaskAreaStateController.prototype.isInTaskArea = function (evt) {
|
|
17369
17387
|
return dom_1.DomUtils.isItParent(this._taskArea, evt_1.EvtUtils.getEventSource(evt));
|
|
17370
17388
|
};
|
|
@@ -17375,7 +17393,8 @@ var TaskAreaStateController = (function () {
|
|
|
17375
17393
|
var key = evt.pointerId;
|
|
17376
17394
|
this._pointers[key] = {
|
|
17377
17395
|
pageX: evt.pageX,
|
|
17378
|
-
pageY: evt.pageY
|
|
17396
|
+
pageY: evt.pageY,
|
|
17397
|
+
pointerType: evt.pointerType
|
|
17379
17398
|
};
|
|
17380
17399
|
};
|
|
17381
17400
|
TaskAreaStateController.prototype._clearPointerInfo = function (evt) {
|
|
@@ -17385,13 +17404,18 @@ var TaskAreaStateController = (function () {
|
|
|
17385
17404
|
TaskAreaStateController.prototype.isTouchEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isTouchEvent(evt); };
|
|
17386
17405
|
TaskAreaStateController.prototype.isPointerEvent = function (evt) { return TaskAreaDomHelper_1.TaskAreaDomHelper.isPointerEvent(evt); };
|
|
17387
17406
|
TaskAreaStateController.prototype._getActivePointersCount = function (evt) {
|
|
17407
|
+
var _this = this;
|
|
17388
17408
|
if (this.isTouchEvent(evt))
|
|
17389
17409
|
return evt.touches.length;
|
|
17390
|
-
return Object.keys(this._pointers).length;
|
|
17410
|
+
return Object.keys(this._pointers).filter(function (p) { return _this._pointers[p].pointerType === evt.pointerType; }).length;
|
|
17391
17411
|
};
|
|
17392
|
-
TaskAreaStateController.prototype.getPointersInfo = function () {
|
|
17412
|
+
TaskAreaStateController.prototype.getPointersInfo = function (evt) {
|
|
17393
17413
|
var _this = this;
|
|
17394
|
-
|
|
17414
|
+
var pointerType = evt === null || evt === void 0 ? void 0 : evt.pointerType;
|
|
17415
|
+
var pointers = Object.keys(this._pointers).map(function (k) { return _this._pointers[k]; });
|
|
17416
|
+
if (pointerType)
|
|
17417
|
+
pointers = pointers.filter(function (p) { return p.pointerType === pointerType; });
|
|
17418
|
+
return pointers;
|
|
17395
17419
|
};
|
|
17396
17420
|
TaskAreaStateController.prototype._canStartDrag = function (evt) {
|
|
17397
17421
|
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.0.
|
|
4
|
-
* Build date: Tue Apr
|
|
3
|
+
* Version: 4.0.16
|
|
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
|