Skip to content

Commit e067a18

Browse files
committed
[update] version 7.1.6
1 parent ce8294a commit e067a18

16 files changed

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

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

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

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

@@ -10846,9 +10846,18 @@ DataStore.prototype = {
1084610846
this.refresh();
1084710847
},
1084810848
silent: function silent(code, master) {
10849+
var alreadySilent = false;
10850+
10851+
if (this._skip_refresh) {
10852+
alreadySilent = true;
10853+
}
10854+
1084910855
this._skip_refresh = true;
1085010856
code.call(master || this);
10851-
this._skip_refresh = false;
10857+
10858+
if (!alreadySilent) {
10859+
this._skip_refresh = false;
10860+
}
1085210861
},
1085310862
arraysEqual: function arraysEqual(arr1, arr2) {
1085410863
if (arr1.length !== arr2.length) return false;
@@ -12704,7 +12713,15 @@ var createDatastoreFacade = function createDatastoreFacade() {
1270412713
});
1270512714
},
1270612715
clearAll: function clearAll() {
12707-
var stores = getDatastores.call(this);
12716+
var stores = getDatastores.call(this); // clear all stores without invoking clearAll event
12717+
// in order to prevent calling handlers when only some stores are cleared
12718+
12719+
for (var i = 0; i < stores.length; i++) {
12720+
stores[i].silent(function () {
12721+
stores[i].clearAll();
12722+
});
12723+
} // run clearAll again to invoke events
12724+
1270812725

1270912726
for (var i = 0; i < stores.length; i++) {
1271012727
stores[i].clearAll();
@@ -19916,6 +19933,8 @@ var Layout = function (_super) {
1991619933
if (!cells.length) return;
1991719934
var property = cells[0].$parent._xLayout ? "width" : "height";
1991819935
var direction = cells[0].$parent.getNextSibling(cells[0].$id) ? 1 : -1;
19936+
var newSizeValue = newSize.value;
19937+
var isGravity = newSize.isGravity;
1991919938

1992019939
for (var i = 0; i < cells.length; i++) {
1992119940
var ownSize = cells[i].getSize();
@@ -19927,21 +19946,25 @@ var Layout = function (_super) {
1992719946

1992819947
var siblingSize = resizeSibling.getSize();
1992919948

19930-
if (resizeSibling[property]) {
19931-
var totalGravity = ownSize.gravity + siblingSize.gravity;
19932-
var totalSize = ownSize[property] + siblingSize[property];
19933-
var k = totalGravity / totalSize;
19934-
cells[i].$config.gravity = k * newSize;
19935-
resizeSibling.$config[property] = totalSize - newSize;
19936-
resizeSibling.$config.gravity = totalGravity - k * newSize;
19949+
if (!isGravity) {
19950+
if (resizeSibling[property]) {
19951+
var totalGravity = ownSize.gravity + siblingSize.gravity;
19952+
var totalSize = ownSize[property] + siblingSize[property];
19953+
var k = totalGravity / totalSize;
19954+
cells[i].$config.gravity = k * newSizeValue;
19955+
resizeSibling.$config[property] = totalSize - newSizeValue;
19956+
resizeSibling.$config.gravity = totalGravity - k * newSizeValue;
19957+
} else {
19958+
cells[i].$config[property] = newSizeValue;
19959+
}
1993719960
} else {
19938-
cells[i].$config[property] = newSize;
19961+
cells[i].$config.gravity = newSizeValue;
1993919962
}
1994019963

1994119964
var mainGrid = this.$gantt.$ui.getView("grid");
1994219965

19943-
if (mainGrid && cells[i].$content === mainGrid && !mainGrid.$config.scrollable) {
19944-
this.$gantt.config.grid_width = newSize;
19966+
if (mainGrid && cells[i].$content === mainGrid && !mainGrid.$config.scrollable && !isGravity) {
19967+
this.$gantt.config.grid_width = newSizeValue;
1994519968
}
1994619969
}
1994719970
};
@@ -23408,7 +23431,19 @@ var initializer = function () {
2340823431
if (grid_limits[1] && gantt.config.grid_width > grid_limits[1]) gantt.config.grid_width = grid_limits[1];
2340923432

2341023433
if (mainTimeline && gantt.config.show_chart) {
23411-
mainGrid.$config.width = gantt.config.grid_width - 1;
23434+
mainGrid.$config.width = gantt.config.grid_width - 1; // GS-1314: Don't let the non-scrollable grid to be larger than the container
23435+
23436+
if (!mainGrid.$config.scrollable && mainGrid.$config.scrollY) {
23437+
var ganttContainerWidth = mainGrid.$gantt.$layout.$container.offsetWidth;
23438+
var verticalScrollbar = gantt.$ui.getView(mainGrid.$config.scrollY);
23439+
var verticalScrollbarWidth = verticalScrollbar.$config.width;
23440+
var gridOverflow = ganttContainerWidth - (mainGrid.$config.width + verticalScrollbarWidth);
23441+
23442+
if (gridOverflow < 0) {
23443+
mainGrid.$config.width += gridOverflow;
23444+
gantt.config.grid_width += gridOverflow;
23445+
}
23446+
}
2341223447

2341323448
if (!first) {
2341423449
if (mainTimeline && !domHelpers.isChildOf(mainTimeline.$task, layout.$view)) {
@@ -23428,13 +23463,19 @@ var initializer = function () {
2342823463
} else {
2342923464
mainGrid.$parent._setContentSize(mainGrid.$config.width, null);
2343023465

23431-
gantt.$layout._syncCellSizes(mainGrid.$parent.$config.group, gantt.config.grid_width);
23466+
gantt.$layout._syncCellSizes(mainGrid.$parent.$config.group, {
23467+
value: gantt.config.grid_width,
23468+
isGravity: false
23469+
});
2343223470
}
2343323471
} else {
2343423472
mainGrid.$parent.$config.width = gantt.config.grid_width;
2343523473

2343623474
if (mainGrid.$parent.$config.group) {
23437-
gantt.$layout._syncCellSizes(mainGrid.$parent.$config.group, mainGrid.$parent.$config.width);
23475+
gantt.$layout._syncCellSizes(mainGrid.$parent.$config.group, {
23476+
value: mainGrid.$parent.$config.width,
23477+
isGravity: false
23478+
});
2343823479
}
2343923480
}
2344023481
} else {
@@ -23470,7 +23511,14 @@ var initializer = function () {
2347023511
if (horizontal) {
2347123512
horizontal.attachEvent("onScroll", function (oldPos, newPos, dir) {
2347223513
var scrollState = gantt.getScrollState();
23473-
gantt.callEvent("onGanttScroll", [oldPos, scrollState.y, newPos, scrollState.y]);
23514+
gantt.callEvent("onGanttScroll", [oldPos, scrollState.y, newPos, scrollState.y]); // if the grid doesn't fit the width, scroll the row container
23515+
23516+
var grid = gantt.$ui.getView("grid");
23517+
23518+
if (grid && grid.$grid_data && !grid.$config.scrollable) {
23519+
grid.$grid_data.style.left = grid.$grid.scrollLeft + "px";
23520+
grid.$grid_data.scrollLeft = grid.$grid.scrollLeft;
23521+
}
2347423522
});
2347523523
}
2347623524

@@ -23522,6 +23570,11 @@ var initializer = function () {
2352223570
if (resizeInfo.resizer) {
2352323571
var gridFirst = resizeInfo.gridFirst,
2352423572
next = resizeInfo.resizer;
23573+
23574+
if (next.$config.mode !== "x") {
23575+
return; // track only horizontal resize
23576+
}
23577+
2352523578
var initialWidth;
2352623579
next.attachEvent("onResizeStart", function (prevCellWidth, nextCellWidth) {
2352723580
var grid = gantt.$ui.getView("grid");
@@ -23554,7 +23607,8 @@ var initializer = function () {
2355423607

2355523608
var res = gantt.callEvent("onGridResizeEnd", [oldSize, newSize]);
2355623609

23557-
if (res) {
23610+
if (res && newSize !== 0) {
23611+
// new size may be numeric zero when cell size is defined by 'gravity', actual size will be calculated by layout later
2355823612
gantt.config.grid_width = newSize;
2355923613
}
2356023614

@@ -26012,6 +26066,8 @@ var rendererFactory = function rendererFactory(gantt) {
2601226066
renderedItems[i] = true;
2601326067
}
2601426068

26069+
var renderCalledFor = {};
26070+
2601526071
for (var i = 0, vis = items.length; i < vis; i++) {
2601626072
var item = items[i];
2601726073
var itemNode = this.rendered[item.id];
@@ -26036,6 +26092,7 @@ var rendererFactory = function rendererFactory(gantt) {
2603626092
this.restore(item, buffer);
2603726093
}
2603826094
} else {
26095+
renderCalledFor[items[i].id] = true;
2603926096
this.render_item(items[i], buffer, viewPort, view, viewConfig);
2604026097
}
2604126098
}
@@ -26054,7 +26111,7 @@ var rendererFactory = function rendererFactory(gantt) {
2605426111
var newElements = {};
2605526112

2605626113
for (var i in this.rendered) {
26057-
if (!renderedItems[i]) {
26114+
if (!renderedItems[i] || renderCalledFor[i]) {
2605826115
newElements[i] = this.rendered[i];
2605926116
renderCallbackMethod.call(gantt, itemsSearch[i], this.rendered[i], view);
2606026117
}
@@ -33475,7 +33532,7 @@ CalendarWorkTimeStrategy.prototype = {
3347533532

3347633533
var timezoneDifference = next.getTimezoneOffset() - current.getTimezoneOffset();
3347733534

33478-
if (timezoneDifference < 0 && step > 0) {
33535+
if (timezoneDifference < 0 && step > 0 && unit != "day") {
3347933536
// the step parameter is for backward scheduling and startDate calcuation
3348033537
next.setTime(next.getTime() + 60 * 1000 * timezoneDifference);
3348133538
}
@@ -39551,7 +39608,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
3955139608

3955239609
function DHXGantt() {
3955339610
this.constants = __webpack_require__(/*! ../constants */ "./sources/constants/index.js");
39554-
this.version = "7.1.5";
39611+
this.version = "7.1.6";
3955539612
this.license = "gpl";
3955639613
this.templates = {};
3955739614
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.5 Standard
4+
dhtmlxGantt v.7.1.6 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.5 Standard
4+
dhtmlxGantt v.7.1.6 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.5 Standard
4+
dhtmlxGantt v.7.1.6 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.5 Standard
4+
dhtmlxGantt v.7.1.6 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.5 Standard
4+
dhtmlxGantt v.7.1.6 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.5 Standard
4+
dhtmlxGantt v.7.1.6 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.5 Standard
4+
dhtmlxGantt v.7.1.6 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.5",
3+
"version": "7.1.6",
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-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
7.1.5
1+
### 7.1.6
2+
3+
Fix the incorrect work of the auto_scheduling_move_projects config when schedule_from_end is enabled
4+
Fix the incorrect work of the onrender callback of the column which caused custom elements to disappear when the grid is scrolled quickly
5+
Fix the regression (appeared in v7.1.5) which caused rows of the grid to disappear after the grid cell is resized in complex layouts
6+
Fix the incorrect work of the size/visibility groups which prevented the sizes of columns from being synchronized in the complex layout
7+
Improved the display of the grid when the gantt is rendered in a small container
8+
9+
### 7.1.5
210

311
Fix the incorrect work of vertical reordering of tasks in the "marker" mode when gantt rows have different heights
412
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

0 commit comments

Comments
 (0)