Skip to content

Commit ce8294a

Browse files
committed
[update] version 7.1.5
1 parent 98449bb commit ce8294a

16 files changed

+79
-51
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.4](https://img.shields.io/badge/npm-v.7.1.4-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
4+
[![npm: v.7.1.5](https://img.shields.io/badge/npm-v.7.1.5-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.4 Standard
131+
dhtmlxGantt v.7.1.5 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.4",
3+
"version": "7.1.5",
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.4
1+
// Type definitions for dhtmlxGantt 7.1.5
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.4 Standard
4+
dhtmlxGantt v.7.1.5 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

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

4-
dhtmlxGantt v.7.1.4 Standard
4+
dhtmlxGantt v.7.1.5 Standard
55

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

@@ -15936,21 +15936,16 @@ module.exports = function (gantt) {
1593615936

1593715937
var utils = __webpack_require__(/*! ../../utils/utils */ "./sources/utils/utils.js");
1593815938

15939-
function ViewSettings(config) {
15940-
utils.mixin(this, config, true);
15941-
}
15942-
1594315939
function extendSettings(store, parentSettings) {
1594415940
var own = this.$config[store];
1594515941

1594615942
if (own) {
15947-
if (own instanceof ViewSettings) {
15948-
return own;
15949-
} else {
15950-
ViewSettings.prototype = parentSettings;
15951-
this.$config[store] = new ViewSettings(own);
15952-
return this.$config[store];
15943+
if (!own.$extendedConfig) {
15944+
own.$extendedConfig = true;
15945+
Object.setPrototypeOf(own, parentSettings);
1595315946
}
15947+
15948+
return own;
1595415949
} else {
1595515950
return parentSettings;
1595615951
}
@@ -16180,7 +16175,7 @@ function create(gantt) {
1618016175
var row = domHelpers.locateAttribute(node, grid.$config.item_attribute);
1618116176
var cell = domHelpers.locateAttribute(node, "data-column-name");
1618216177

16183-
if (cell) {
16178+
if (row && cell) {
1618416179
var columnName = cell.getAttribute("data-column-name");
1618516180
var id = row.getAttribute(grid.$config.item_attribute);
1618616181
return {
@@ -18156,7 +18151,7 @@ Grid.prototype = {
1815618151

1815718152
var ariaAttrs = gantt._waiAria.gridScaleCellAttrString(col, label);
1815818153

18159-
var cell = "<div class='" + cssClass + "' style='" + style + "' " + ariaAttrs + " data-column-id='" + col.name + "' column_id='" + col.name + "'>" + label + sort + "</div>";
18154+
var cell = "<div class='" + cssClass + "' style='" + style + "' " + ariaAttrs + " data-column-id='" + col.name + "' column_id='" + col.name + "'" + " data-column-name='" + col.name + "' data-column-index='" + i + "'" + ">" + label + sort + "</div>";
1816018155
cells.push(cell);
1816118156
}
1816218157

@@ -18811,12 +18806,23 @@ function _init_dnd(gantt, grid) {
1881118806
var scrollPos = grid.$state.scrollTop || 0;
1881218807
var maxBottom = gantt.$grid_data.getBoundingClientRect().height + scrollPos;
1881318808
var minTop = scrollPos;
18814-
var firstVisibleTaskPos = grid.$state.scrollTop / grid.getItemHeight();
18809+
var firstVisibleTaskIndex = grid.getItemIndexByTopPosition(grid.$state.scrollTop);
18810+
18811+
if (!store.exists(firstVisibleTaskIndex)) {
18812+
firstVisibleTaskIndex = store.countVisible() - 1;
18813+
}
18814+
18815+
if (firstVisibleTaskIndex < 0) {
18816+
return store.$getRootId();
18817+
}
18818+
18819+
var firstVisibleTaskId = store.getIdByIndex(firstVisibleTaskIndex);
18820+
var firstVisibleTaskPos = grid.$state.scrollTop / grid.getItemHeight(firstVisibleTaskId);
1881518821
var hiddenTaskPart = firstVisibleTaskPos - Math.floor(firstVisibleTaskPos);
1881618822

1881718823
if (hiddenTaskPart > 0.1 && hiddenTaskPart < 0.9) {
18818-
maxBottom = maxBottom - grid.getItemHeight() * hiddenTaskPart;
18819-
minTop = minTop + grid.getItemHeight() * (1 - hiddenTaskPart);
18824+
maxBottom = maxBottom - grid.getItemHeight(firstVisibleTaskId) * hiddenTaskPart;
18825+
minTop = minTop + grid.getItemHeight(firstVisibleTaskId) * (1 - hiddenTaskPart);
1882018826
}
1882118827

1882218828
if (y >= maxBottom) {
@@ -18825,9 +18831,9 @@ function _init_dnd(gantt, grid) {
1882518831
y = minTop;
1882618832
}
1882718833

18828-
var index = Math.floor(y / grid.getItemHeight());
18834+
var index = grid.getItemIndexByTopPosition(y);
1882918835

18830-
if (index > store.countVisible() - 1) {
18836+
if (index > store.countVisible() - 1 || index < 0) {
1883118837
return store.$getRootId();
1883218838
}
1883318839

@@ -19825,7 +19831,7 @@ var Layout = function (_super) {
1982519831
Layout.prototype._resizeScrollbars = function (autosize, scrollbars) {
1982619832
var scrollChanged = false;
1982719833
var visibleScrollbars = [],
19828-
hiddenSrollbars = [];
19834+
hiddenScrollbars = [];
1982919835

1983019836
function showScrollbar(scrollbar) {
1983119837
scrollbar.$parent.show();
@@ -19836,7 +19842,7 @@ var Layout = function (_super) {
1983619842
function hideScrollbar(scrollbar) {
1983719843
scrollbar.$parent.hide();
1983819844
scrollChanged = true;
19839-
hiddenSrollbars.push(scrollbar);
19845+
hiddenScrollbars.push(scrollbar);
1984019846
}
1984119847

1984219848
var scrollbar;
@@ -19854,7 +19860,7 @@ var Layout = function (_super) {
1985419860
if (scrollbar.isVisible()) {
1985519861
visibleScrollbars.push(scrollbar);
1985619862
} else {
19857-
hiddenSrollbars.push(scrollbar);
19863+
hiddenScrollbars.push(scrollbar);
1985819864
}
1985919865
}
1986019866
}
@@ -19867,8 +19873,8 @@ var Layout = function (_super) {
1986719873
}
1986819874
}
1986919875

19870-
for (var i = 0; i < hiddenSrollbars.length; i++) {
19871-
scrollbar = hiddenSrollbars[i];
19876+
for (var i = 0; i < hiddenScrollbars.length; i++) {
19877+
scrollbar = hiddenScrollbars[i];
1987219878

1987319879
if (scrollbar.$config.group && visibleGroups[scrollbar.$config.group]) {
1987419880
showScrollbar(scrollbar); // GS-707 If the scrollbar was hidden then showed, the container resize shouldn't happen because of that
@@ -20475,10 +20481,15 @@ var Layout = function (_super) {
2047520481
var firstCall = !this._visibleCells;
2047620482
var visibleCells = {};
2047720483
var cell;
20484+
var parentVisibility = [];
2047820485

2047920486
for (var i = 0; i < this._sizes.length; i++) {
2048020487
cell = this.$cells[i];
2048120488

20489+
if (cell.$config.hide_empty) {
20490+
parentVisibility.push(cell);
20491+
}
20492+
2048220493
if (!firstCall && cell.$config.hidden && oldVisibleCells[cell.$id]) {
2048320494
cell._hide(true);
2048420495
} else if (!cell.$config.hidden && !oldVisibleCells[cell.$id]) {
@@ -20490,7 +20501,19 @@ var Layout = function (_super) {
2049020501
}
2049120502
}
2049220503

20493-
this._visibleCells = visibleCells;
20504+
this._visibleCells = visibleCells; // GS-27. A way to hide the whole cell if all its children are hidden
20505+
20506+
for (var i = 0; i < parentVisibility.length; i++) {
20507+
var cell = parentVisibility[i];
20508+
var children = cell.$cells;
20509+
var hideCell = true;
20510+
children.forEach(function (child) {
20511+
if (!child.$config.hidden && !child.$config.resizer) {
20512+
hideCell = false;
20513+
}
20514+
});
20515+
cell.$config.hidden = hideCell;
20516+
}
2049420517
};
2049520518

2049620519
Layout.prototype.setSize = function (x, y) {
@@ -23366,20 +23389,16 @@ var initializer = function () {
2336623389
if (mainTimeline) mainTimeline.$config.hidden = mainTimeline.$parent.$config.hidden = !gantt.config.show_chart;
2336723390
var mainGrid = gantt.$ui.getView("grid");
2336823391
if (!mainGrid) return;
23369-
var showGrid = gantt.config.show_grid;
2337023392

23371-
if (first) {
23372-
var colsWidth = mainGrid._getColsTotalWidth();
23393+
var colsWidth = mainGrid._getColsTotalWidth();
2337323394

23374-
if (colsWidth !== false) {
23375-
gantt.config.grid_width = colsWidth;
23376-
}
23395+
var hideGrid = !gantt.config.show_grid || !gantt.config.grid_width || colsWidth === 0;
2337723396

23378-
showGrid = showGrid && !!gantt.config.grid_width;
23379-
gantt.config.show_grid = showGrid;
23397+
if (first && !hideGrid && colsWidth !== false) {
23398+
gantt.config.grid_width = colsWidth;
2338023399
}
2338123400

23382-
mainGrid.$config.hidden = mainGrid.$parent.$config.hidden = !showGrid;
23401+
mainGrid.$config.hidden = mainGrid.$parent.$config.hidden = hideGrid;
2338323402

2338423403
if (!mainGrid.$config.hidden) {
2338523404
/* restrict grid width due to min_width, max_width, min_grid_column_width */
@@ -39532,7 +39551,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
3953239551

3953339552
function DHXGantt() {
3953439553
this.constants = __webpack_require__(/*! ../constants */ "./sources/constants/index.js");
39535-
this.version = "7.1.4";
39554+
this.version = "7.1.5";
3953639555
this.license = "gpl";
3953739556
this.templates = {};
3953839557
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.4 Standard
4+
dhtmlxGantt v.7.1.5 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.4 Standard
4+
dhtmlxGantt v.7.1.5 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.4 Standard
4+
dhtmlxGantt v.7.1.5 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.4 Standard
4+
dhtmlxGantt v.7.1.5 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.4 Standard
4+
dhtmlxGantt v.7.1.5 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.4 Standard
4+
dhtmlxGantt v.7.1.5 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.4 Standard
4+
dhtmlxGantt v.7.1.5 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.4",
3+
"version": "7.1.5",
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

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
7.1.5
2+
3+
Fix the incorrect work of vertical reordering of tasks in the "marker" mode when gantt rows have different heights
4+
Fix the issue with the sizes of the timeline and the grid in some layouts when the "show_grid" and "show_chart" configs are disabled
5+
The "data-column-name" and "data-column-index" attributes are added for cells of the grid header
6+
Fix the incorrect display of the grid after re-initialization of the gantt after removing all columns from the config
7+
Fix the issue that caused the resource panel configuration to overwrite the main configuration of the gantt in Vue.js applications
8+
Added the ability to modify the configuration of the resource panel on the fly by modifying the configuration object provided to the resource layout
9+
110
### 7.1.4
211

312
Fix the incorrect work of unsetWorkTime that caused affected dates to have incorrect work hours

0 commit comments

Comments
 (0)