Skip to content

Commit e42d277

Browse files
committed
[update] version v8.0.4
1 parent 2799e51 commit e42d277

16 files changed

+88
-47
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.8.0.3](https://img.shields.io/badge/npm-v.8.0.3-blue.svg)](https://www.npmjs.com/package/dhtmlx-gantt)
4+
[![npm: v.8.0.4](https://img.shields.io/badge/npm-v.8.0.4-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) | [License](#license) | [Useful links](#links) | [Follow us](#followus)
@@ -117,7 +117,7 @@ Resource management, critical path calculation, auto scheduling, and other enhan
117117
<a name="license"></a>
118118
## License ##
119119

120-
dhtmlxGantt v.8.0.3 Standard
120+
dhtmlxGantt v.8.0.4 Standard
121121

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

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gantt",
3-
"version": "8.0.3",
3+
"version": "8.0.4",
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 8.0.3
1+
// Type definitions for dhtmlxGantt 8.0.4
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.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 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

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

4-
dhtmlxGantt v.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 Standard
55

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

@@ -10558,6 +10558,7 @@ var DataProcessorEvents = /** @class */ (function () {
1055810558
methods.delete.call(gantt, id);
1055910559
}
1056010560
});
10561+
this.handleResourceCRUD(dp, gantt);
1056110562
this.handleResourceAssignmentCRUD(dp, gantt);
1056210563
};
1056310564
DataProcessorEvents.prototype.clientSideDelete = function (id, dp, gantt) {
@@ -21062,6 +21063,7 @@ var Layout = function (_super) {
2106221063
var scrollChanged = false;
2106321064
var visibleScrollbars = [],
2106421065
hiddenScrollbars = [];
21066+
var scrollbarsToHide = [];
2106521067

2106621068
function showScrollbar(scrollbar) {
2106721069
scrollbar.$parent.show();
@@ -21083,7 +21085,8 @@ var Layout = function (_super) {
2108321085
if (autosize[scrollbar.$config.scroll]) {
2108421086
hideScrollbar(scrollbar);
2108521087
} else if (scrollbar.shouldHide()) {
21086-
hideScrollbar(scrollbar);
21088+
//hideScrollbar(scrollbar);
21089+
scrollbarsToHide.push(scrollbar);
2108721090
} else if (scrollbar.shouldShow()) {
2108821091
showScrollbar(scrollbar);
2108921092
} else {
@@ -21101,7 +21104,14 @@ var Layout = function (_super) {
2110121104
if (visibleScrollbars[i].$config.group) {
2110221105
visibleGroups[visibleScrollbars[i].$config.group] = true;
2110321106
}
21104-
}
21107+
} // GS-2220
21108+
21109+
21110+
scrollbarsToHide.forEach(function (scrollbar) {
21111+
if (!(scrollbar.$config.group && visibleGroups[scrollbar.$config.group])) {
21112+
hideScrollbar(scrollbar);
21113+
}
21114+
});
2110521115

2110621116
for (var i = 0; i < hiddenScrollbars.length; i++) {
2110721117
scrollbar = hiddenScrollbars[i];
@@ -35694,48 +35704,56 @@ CalendarWorkTimeStrategy.prototype = {
3569435704

3569535705
var isWorkHour = false;
3569635706
var workInterval = null;
35707+
var prevInterval = null;
3569735708

3569835709
for (var i = daySchedule.length - 1; i >= 0; i--) {
3569935710
if (daySchedule[i].start < timestamp - 1 && daySchedule[i].end >= timestamp - 1) {
3570035711
isWorkHour = true;
3570135712
workInterval = daySchedule[i];
35713+
prevInterval = daySchedule[i - 1];
3570235714
break;
3570335715
}
3570435716
}
3570535717

3570635718
if (isWorkHour) {
35719+
// we're at the end of worktime interval and subtracting more than the duration of the interval
35720+
// -> subtract the duration of the interval and move to the start of the interval (we're moving from end)
3570735721
if (timestamp === workInterval.end && left >= workInterval.durationMinutes) {
3570835722
added += workInterval.durationMinutes;
3570935723
start = this.$gantt.date.add(start, -workInterval.durationMinutes, "minute");
35710-
} else if (!minutePrecision && left <= timestamp / 60 - workInterval.startMinute) {
35711-
added += left;
35712-
start = this.$gantt.date.add(start, -left, "minute");
35713-
} else if (minutePrecision) {
35714-
// GS-2129. If the working time is set in minutes, we accumulate the working time in minutes from right to left
35715-
var previousHour = this._getClosestWorkTime(this._nextDate(start, "hour", step), "hour");
35716-
35717-
var _minutesInHour = this._getMinutesPerHour(previousHour);
35724+
} // worktime is set in whole hours (no intervals like 9:15-10:00)
35725+
// the amount we need to subtract lies inside the interval
35726+
else if (!minutePrecision && left <= timestamp / 60 - workInterval.startMinute) {
35727+
added += left;
35728+
start = this.$gantt.date.add(start, -left, "minute");
35729+
} else if (minutePrecision) {
35730+
// GS-2129. If the working time is set in minutes, we accumulate the working time in minutes from right to left
35731+
// duration we need to subtract lies completely inside the work interval
35732+
if (left <= timestamp / 60 - workInterval.startMinute) {
35733+
added += left;
35734+
start = this.$gantt.date.add(start, -left, "minute");
35735+
} else {
35736+
// we need to go trough multiple work intervals to subtract needed time
35737+
added += timestamp / 60 - workInterval.startMinute;
3571835738

35719-
if (left < _minutesInHour && _minutesInHour <= 60) {
35720-
_minutesInHour = left;
35721-
start = this.$gantt.date.add(start, -_minutesInHour, "minute");
35739+
if (prevInterval) {
35740+
start = new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, 0, prevInterval.end);
35741+
} else {
35742+
start = this.$gantt.date.day_start(start);
35743+
}
35744+
}
3572235745
} else {
35723-
start = previousHour;
35724-
}
35746+
var minutesInHour = this._getMinutesPerHour(start);
3572535747

35726-
added += _minutesInHour;
35727-
} else {
35728-
var minutesInHour = this._getMinutesPerHour(start);
35729-
35730-
if (minutesInHour <= left) {
35731-
added += minutesInHour;
35732-
start = this._nextDate(start, "hour", step);
35733-
} else {
35734-
addedInterval = this._subtractMinutesUntilHourStart(start, left);
35735-
added += addedInterval.added;
35736-
start = addedInterval.end;
35748+
if (minutesInHour <= left) {
35749+
added += minutesInHour;
35750+
start = this._nextDate(start, "hour", step);
35751+
} else {
35752+
addedInterval = this._subtractMinutesUntilHourStart(start, left);
35753+
added += addedInterval.added;
35754+
start = addedInterval.end;
35755+
}
3573735756
}
35738-
}
3573935757
} else {
3574035758
if (start.getHours() === 0 && start.getMinutes() === 0 && start.getSeconds() === 0) {
3574135759
var prev = this._getClosestWorkTimePast(start, "hour");
@@ -40955,10 +40973,20 @@ function default_1(gantt) {
4095540973
undo: function () { return _undo.undo(); },
4095640974
redo: function () { return _undo.redo(); },
4095740975
getUndoStack: function () { return _undo.getUndoStack(); },
40976+
setUndoStack: function (stack) { return _undo.setUndoStack(stack); },
4095840977
getRedoStack: function () { return _undo.getRedoStack(); },
40978+
setRedoStack: function (stack) { return _undo.setRedoStack(stack); },
4095940979
clearUndoStack: function () { return _undo.clearUndoStack(); },
4096040980
clearRedoStack: function () { return _undo.clearRedoStack(); },
40961-
saveState: function (id, type) { return monitor.store(id, type, true); }
40981+
saveState: function (id, type) { return monitor.store(id, type, true); },
40982+
getInitialState: function (id, type) {
40983+
if (type === gantt.config.undo_types.link) {
40984+
return monitor.getInitialLink(id);
40985+
}
40986+
else {
40987+
return monitor.getInitialTask(id);
40988+
}
40989+
}
4096240990
};
4096340991
gantt.undo = gantt.ext.undo.undo;
4096440992
gantt.redo = gantt.ext.undo.redo;
@@ -41475,9 +41503,15 @@ var Undo = /** @class */ (function () {
4147541503
Undo.prototype.getUndoStack = function () {
4147641504
return this._undoStack;
4147741505
};
41506+
Undo.prototype.setUndoStack = function (stack) {
41507+
this._undoStack = stack;
41508+
};
4147841509
Undo.prototype.getRedoStack = function () {
4147941510
return this._redoStack;
4148041511
};
41512+
Undo.prototype.setRedoStack = function (stack) {
41513+
this._redoStack = stack;
41514+
};
4148141515
Undo.prototype.clearUndoStack = function () {
4148241516
this._undoStack = [];
4148341517
};
@@ -41654,7 +41688,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
4165441688

4165541689
function DHXGantt() {
4165641690
this.constants = __webpack_require__(/*! ../constants */ "./sources/constants/index.js");
41657-
this.version = "8.0.3";
41691+
this.version = "8.0.4";
4165841692
this.license = "gpl";
4165941693
this.templates = {};
4166041694
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.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 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.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 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.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 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.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 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.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 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.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 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.8.0.3 Standard
4+
dhtmlxGantt v.8.0.4 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": "8.0.3",
3+
"version": "8.0.4",
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

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### 8.0.4
2+
3+
Fix issue with DataProcessor not tracking changes of the Resource Datastore
4+
Resolve an error that occurred after dragging a task when the process_resource_assignments config is disabled
5+
Fix the incorrect work of gantt.calculateEndDate when subtracting dates in minute units
6+
Minor performance improvement for layouts with visibility groups
7+
18
### 8.0.3
29

310
Performance improvements for the Resource Panel

0 commit comments

Comments
 (0)