Skip to content

Commit 12fe75f

Browse files
committed
[update] version 7.1.9
1 parent 0545085 commit 12fe75f

16 files changed

+82
-40
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# dhtmlxGantt #
22

33
[![dhtmlx.com](https://img.shields.io/badge/made%20by-DHTMLX-blue)](https://dhtmlx.com/)
4-
[![npm: v.7.1.8](https://img.shields.io/badge/npm-v.7.1.8-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
4+
[![npm: v.7.1.9](https://img.shields.io/badge/npm-v.7.1.9-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
55
[![License: GPL v2](https://img.shields.io/badge/license-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
66

77
[Getting started](#getting-started) | [Features](#features) | [Follow us](#followus) | [License](#license) | [Useful links](#links)
@@ -128,7 +128,7 @@ Like our page on [Facebook](https://www.facebook.com/dhtmlx/) :thumbsup:
128128
<a name="license"></a>
129129
## License ##
130130

131-
dhtmlxGantt v.7.1.8 Standard
131+
dhtmlxGantt v.7.1.9 Standard
132132

133133
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
134134

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gantt",
3-
"version": "7.1.8",
3+
"version": "7.1.9",
44
"homepage": "https://dhtmlx.com/docs/products/dhtmlxGantt/",
55
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
66
"main": [

codebase/dhtmlxgantt.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for dhtmlxGantt 7.1.8
1+
// Type definitions for dhtmlxGantt 7.1.9
22
// Project: https://dhtmlx.com/docs/products/dhtmlxGantt
33

44
type GanttCallback = (...args: any[]) => any;

codebase/dhtmlxgantt.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/dhtmlxgantt.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codebase/sources/dhtmlxgantt.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/dhtmlxgantt.js

+47-23
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33

4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55

66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

@@ -13284,7 +13284,7 @@ function createLayoutFacade() {
1328413284

1328513285
for (var i = 0; i < verticalViews.length; i++) {
1328613286
for (var j = 0; j < horizontalViews.length; j++) {
13287-
if (verticalViews[i].$config.id && verticalViews[j].$config.id && verticalViews[i].$config.id === verticalViews[j].$config.id) {
13287+
if (verticalViews[i].$config.id && horizontalViews[j].$config.id && verticalViews[i].$config.id === horizontalViews[j].$config.id) {
1328813288
commonViews.push(verticalViews[i].$config.id);
1328913289
}
1329013290
}
@@ -17558,11 +17558,7 @@ module.exports = function (gantt) {
1755817558

1755917559
function keepDurationOnEdit(item, mapTo) {
1756017560
if (mapTo == "end_date") {
17561-
item.start_date = gantt.calculateEndDate({
17562-
start_date: item.end_date,
17563-
duration: -item.duration,
17564-
task: item
17565-
});
17561+
item.start_date = decreaseStartDate(item);
1756617562
} else if (mapTo == "start_date" || mapTo == "duration") {
1756717563
item.end_date = gantt.calculateEndDate(item);
1756817564
}
@@ -17572,12 +17568,28 @@ module.exports = function (gantt) {
1757217568

1757317569

1757417570
function defaultActionOnEdit(item, mapTo) {
17575-
if (mapTo == "start_date" || mapTo == "duration") {
17576-
item.end_date = gantt.calculateEndDate(item);
17577-
} else if (mapTo == "end_date") {
17578-
item.duration = gantt.calculateDuration(item);
17571+
if (gantt.config.schedule_from_end) {
17572+
if (mapTo == "end_date" || mapTo == "duration") {
17573+
item.start_date = decreaseStartDate(item);
17574+
} else if (mapTo == "start_date") {
17575+
item.duration = gantt.calculateDuration(item);
17576+
}
17577+
} else {
17578+
if (mapTo == "start_date" || mapTo == "duration") {
17579+
item.end_date = gantt.calculateEndDate(item);
17580+
} else if (mapTo == "end_date") {
17581+
item.duration = gantt.calculateDuration(item);
17582+
}
1757917583
}
1758017584
}
17585+
17586+
function decreaseStartDate(item) {
17587+
return gantt.calculateEndDate({
17588+
start_date: item.end_date,
17589+
duration: -item.duration,
17590+
task: item
17591+
});
17592+
}
1758117593
};
1758217594

1758317595
/***/ }),
@@ -20610,7 +20622,7 @@ var Layout = function (_super) {
2061020622
var oldVisibleCells = this._visibleCells || {};
2061120623
var firstCall = !this._visibleCells;
2061220624
var visibleCells = {};
20613-
var cell;
20625+
var cell = null;
2061420626
var parentVisibility = [];
2061520627

2061620628
for (var i = 0; i < this._sizes.length; i++) {
@@ -23324,7 +23336,7 @@ module.exports = function (gantt) {
2332423336
range = range || 10;
2332523337
offset = offset || Math.floor(range / 2);
2332623338
start_year = start_year || settings.date.getFullYear() - offset;
23327-
end_year = end_year || start_year + range;
23339+
end_year = end_year || gantt.getState().max_date.getFullYear() + offset;
2332823340

2332923341
for (i = start_year; i < end_year; i++) {
2333023342
html += "<option value='" + i + "'>" + i + "</option>";
@@ -23539,9 +23551,9 @@ var initializer = function () {
2353923551
if (grid_limits[1] && gantt.config.grid_width > grid_limits[1]) gantt.config.grid_width = grid_limits[1];
2354023552

2354123553
if (mainTimeline && gantt.config.show_chart) {
23542-
mainGrid.$config.width = gantt.config.grid_width - 1; // GS-1314: Don't let the non-scrollable grid to be larger than the container
23554+
mainGrid.$config.width = gantt.config.grid_width - 1; // GS-1314: Don't let the non-scrollable grid to be larger than the container with the correct width
2354323555

23544-
if (!mainGrid.$config.scrollable && mainGrid.$config.scrollY) {
23556+
if (!mainGrid.$config.scrollable && mainGrid.$config.scrollY && gantt.$root.offsetWidth) {
2354523557
var ganttContainerWidth = mainGrid.$gantt.$layout.$container.offsetWidth;
2354623558
var verticalScrollbar = gantt.$ui.getView(mainGrid.$config.scrollY);
2354723559
var verticalScrollbarWidth = verticalScrollbar.$config.width;
@@ -24244,7 +24256,7 @@ var createMouseHandler = function (domHelpers) {
2424424256
if (!default_action) return;
2424524257

2424624258
if (id !== null && gantt.getTask(id)) {
24247-
if (res && gantt.config.details_on_dblclick && !gantt.isReadonly()) {
24259+
if (res && gantt.config.details_on_dblclick && !gantt.isReadonly(id)) {
2424824260
gantt.showLightbox(id);
2424924261
}
2425024262
}
@@ -29590,11 +29602,17 @@ function createTaskDND(timeline, gantt) {
2959029602

2959129603
return correctShift;
2959229604
},
29593-
_move: function _move(task, shift, drag) {
29605+
_move: function _move(task, shift, drag, multipleDragShift) {
2959429606
var coords_x = this._drag_task_coords(task, drag);
2959529607

29596-
var new_start = gantt.dateFromPos(coords_x.start + shift),
29597-
new_end = gantt.dateFromPos(coords_x.end + shift);
29608+
var new_start = null,
29609+
new_end = null; // GS-454: If we drag multiple tasks, rely on the dates instead of timeline coordinates
29610+
29611+
if (multipleDragShift) {
29612+
new_start = new Date(+drag.obj.start_date + multipleDragShift), new_end = new Date(+drag.obj.end_date + multipleDragShift);
29613+
} else {
29614+
new_start = gantt.dateFromPos(coords_x.start + shift), new_end = gantt.dateFromPos(coords_x.end + shift);
29615+
}
2959829616

2959929617
if (!new_start) {
2960029618
task.start_date = new Date(gantt.getState().min_date);
@@ -29646,12 +29664,12 @@ function createTaskDND(timeline, gantt) {
2964629664
this._update_on_move(e);
2964729665
}
2964829666
},
29649-
_update_item_on_move: function _update_item_on_move(shift, id, mode, drag, e) {
29667+
_update_item_on_move: function _update_item_on_move(shift, id, mode, drag, e, multipleDragShift) {
2965029668
var task = gantt.getTask(id);
2965129669
var original = gantt.mixin({}, task);
2965229670
var copy = gantt.mixin({}, task);
2965329671

29654-
this._handlers[mode].apply(this, [copy, shift, drag]);
29672+
this._handlers[mode].apply(this, [copy, shift, drag, multipleDragShift]);
2965529673

2965629674
gantt.mixin(task, copy, true); //gantt._update_parents(drag.id, true);
2965729675

@@ -29706,9 +29724,15 @@ function createTaskDND(timeline, gantt) {
2970629724

2970729725
if (dragProject && childDrag.id != drag.id) {
2970829726
gantt._bulk_dnd = true;
29727+
} // GS-454: Calculate the date shift in milliseconds instead of pixels
29728+
29729+
29730+
if (maxShift === undefined && (dragProject || Object.keys(dragHash).length > 1)) {
29731+
var shiftDate = gantt.dateFromPos(drag.start_x);
29732+
var multipleDragShift = curr_date - shiftDate;
2970929733
}
2971029734

29711-
this._update_item_on_move(shift, childDrag.id, childDrag.mode, childDrag, e);
29735+
this._update_item_on_move(shift, childDrag.id, childDrag.mode, childDrag, e, multipleDragShift);
2971229736
}
2971329737

2971429738
gantt._bulk_dnd = false;
@@ -39820,7 +39844,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
3982039844

3982139845
function DHXGantt() {
3982239846
this.constants = __webpack_require__(/*! ../constants */ "./sources/constants/index.js");
39823-
this.version = "7.1.8";
39847+
this.version = "7.1.9";
3982439848
this.license = "gpl";
3982539849
this.templates = {};
3982639850
this.ext = {};

codebase/sources/skins/dhtmlxgantt_broadway.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_contrast_black.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_contrast_white.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_material.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_meadow.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_skyblue.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

codebase/sources/skins/dhtmlxgantt_terrace.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
@license
33
4-
dhtmlxGantt v.7.1.8 Standard
4+
dhtmlxGantt v.7.1.9 Standard
55
66
This version of dhtmlxGantt is distributed under GPL 2.0 license and can be legally used in GPL projects.
77

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dhtmlx-gantt",
3-
"version": "7.1.8",
3+
"version": "7.1.9",
44
"description": "An open source JavaScript Gantt chart that helps you illustrate a project schedule in a nice-looking chart.",
55
"main": "codebase/dhtmlxgantt.js",
66
"types": "codebase/dhtmlxgantt.d.ts",

whatsnew.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
### 7.1.9
2+
3+
Fix the issue with alignment of subtasks after dragging a project in the "year" scale and switching between scales dynamically
4+
Fix the issue which caused the duration of the project to change after dragging the project with subtasks in the "month" scale
5+
Fix the issue with Auto Scheduling that caused the constraint type to be changed from "ASAP" to "SNET" after changing the duration of the task
6+
Fix the incorrect work of backward scheduling after changing the start and end dates via inline editors when schedule_from_end is enabled
7+
Now it is possible to open the lightbox for read-only tasks in the read-only mode
8+
Now it is impossible to edit read-only tasks via the lightbox
9+
Fix the issue with the lightbox which caused it not to open for editable tasks in the read-only mode (appeared in v6.3.1)
10+
Fix the issue with resizing columns in grid after hiding the timeline via show_chart
11+
Fix the issue with Auto Scheduling which couldn't be canceled after changing values of project_start and project_end
12+
Fix the issue which caused the gantt to assign constraints to the tasks with disabled auto-scheduling
13+
Fix the issue with defining a year range by the lightbox when the range of dates of tasks is more than 10 years and a range for the year selector isn't specified
14+
Fix the script error that was thrown after loading Gantt if a horizontal scrollbar was attached to 3 or more vertical views
15+
Fix the incorrect work of the onBeforeTaskAutoSchedule event after setting the ASAP constraint for the task without links when the strict mode is enabled
16+
Fix the error occurred when running minified versions of Gantt in Next.js projects
17+
Fix the issue which caused the width of Gantt to be changed after initializing the gantt instance inside an empty container
18+
119
### 7.1.8
220

321
Fix the script error that was thrown from the gantt.groupBy method when the Resource Histogram and fit_tasks config were enabled

0 commit comments

Comments
 (0)