devexpress-gantt 4.0.5 → 4.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt)
3
- * Version: 4.0.5
4
- * Build date: Wed Jan 26 2022
3
+ * Version: 4.0.6
4
+ * Build date: Wed Feb 02 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.5
4
- * Build date: Wed Jan 26 2022
3
+ * Version: 4.0.6
4
+ * Build date: Wed Feb 02 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
@@ -2895,7 +2895,8 @@ var GridLayoutCalculator = (function () {
2895
2895
  return new size_1.Size(width, 0);
2896
2896
  };
2897
2897
  GridLayoutCalculator.prototype.getTaskProgressWidth = function (index) {
2898
- return this.getTaskWidth(index) * this.getTask(index).progress / 100;
2898
+ var progress = Math.max(Math.min(this.getTask(index).progress, 100), 0);
2899
+ return this.getTaskWidth(index) * progress / 100;
2899
2900
  };
2900
2901
  GridLayoutCalculator.prototype.getTaskTextElementInfo = function (index, isInsideText) {
2901
2902
  var result = new GridElementInfo_1.GridElementInfo();
@@ -3074,7 +3075,10 @@ var GridLayoutCalculator = (function () {
3074
3075
  return this.getWidthByDateRange(this.range.start, date);
3075
3076
  };
3076
3077
  GridLayoutCalculator.prototype.getWidthByDateRange = function (start, end) {
3077
- return Math.max(DateUtils_1.DateUtils.getRangeTickCount(start, end, this.viewType) * this.tickSize.width, 0);
3078
+ return Math.max(this.getDistanceBetweenDates(start, end), 0);
3079
+ };
3080
+ GridLayoutCalculator.prototype.getDistanceBetweenDates = function (start, end) {
3081
+ return DateUtils_1.DateUtils.getRangeTickCount(start, end, this.viewType) * this.tickSize.width;
3078
3082
  };
3079
3083
  GridLayoutCalculator.prototype.getDateByPos = function (position) {
3080
3084
  if (this.viewType === Enums_1.ViewType.Months || this.viewType === Enums_1.ViewType.Quarter)
@@ -5091,6 +5095,10 @@ var GanttPdfExportProps = (function () {
5091
5095
  this.pageSize = new size_1.Size(width, height);
5092
5096
  }
5093
5097
  }
5098
+ else if ((0, common_1.isDefined)(source.pageSize)) {
5099
+ var size = source.pageSize;
5100
+ this.pageSize = size instanceof size_1.Size ? size.clone() : new size_1.Size(size.width, size.height);
5101
+ }
5094
5102
  if ((0, common_1.isDefined)(source.exportMode))
5095
5103
  this.exportMode = this.getEnumValue(ExportMode, source.exportMode);
5096
5104
  if ((0, common_1.isDefined)(source.dateRange)) {
@@ -12433,7 +12441,7 @@ var TaskAreaExportHelper = (function () {
12433
12441
  Object.defineProperty(TaskAreaExportHelper.prototype, "customRangeLeftOffset", {
12434
12442
  get: function () {
12435
12443
  var _a;
12436
- (_a = this._customRangeLeftOffset) !== null && _a !== void 0 ? _a : (this._customRangeLeftOffset = Math.max(this.layoutCalculator.getWidthByDateRange(this.startDate, this.ownerStartDate), 0));
12444
+ (_a = this._customRangeLeftOffset) !== null && _a !== void 0 ? _a : (this._customRangeLeftOffset = this.layoutCalculator.getDistanceBetweenDates(this.startDate, this.ownerStartDate));
12437
12445
  return this._customRangeLeftOffset;
12438
12446
  },
12439
12447
  enumerable: false,
@@ -12780,7 +12788,7 @@ var TaskAreaExportHelper = (function () {
12780
12788
  get: function () {
12781
12789
  var _this = this;
12782
12790
  var _a;
12783
- (_a = this._connectorLines) !== null && _a !== void 0 ? _a : (this._connectorLines = this._owner.renderHelper.renderedConnectorLines.filter(function (l) { return _this.isLineVisible(l); }));
12791
+ (_a = this._connectorLines) !== null && _a !== void 0 ? _a : (this._connectorLines = this._owner.renderHelper.allConnectorLines.filter(function (l) { return _this.isLineVisible(l); }));
12784
12792
  return this._connectorLines;
12785
12793
  },
12786
12794
  enumerable: false,
@@ -12913,7 +12921,7 @@ var TaskAreaExportHelper = (function () {
12913
12921
  });
12914
12922
  Object.defineProperty(TaskAreaExportHelper.prototype, "hasCustomRangeOutOfRender", {
12915
12923
  get: function () {
12916
- return this.startDate.getTime() < this.ownerStartDate.getTime() || this.endDate.getTime() > this.ownerEndDate.getTime();
12924
+ return this.startDate.getTime() !== this.ownerStartDate.getTime() || this.endDate.getTime() !== this.ownerEndDate.getTime();
12917
12925
  },
12918
12926
  enumerable: false,
12919
12927
  configurable: true
@@ -15926,6 +15934,14 @@ var RenderHelper = (function () {
15926
15934
  enumerable: false,
15927
15935
  configurable: true
15928
15936
  });
15937
+ Object.defineProperty(RenderHelper.prototype, "allConnectorLines", {
15938
+ get: function () {
15939
+ var lines = this.gridLayoutCalculator.tileToDependencyMap.reduce(function (acc, tile) { return acc = acc.concat(tile); }, []);
15940
+ return lines;
15941
+ },
15942
+ enumerable: false,
15943
+ configurable: true
15944
+ });
15929
15945
  Object.defineProperty(RenderHelper.prototype, "resourcesElements", {
15930
15946
  get: function () {
15931
15947
  return this._resourceRender.resourcesElements;
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * DevExpress Gantt (dx-gantt.min)
3
- * Version: 4.0.5
4
- * Build date: Wed Jan 26 2022
3
+ * Version: 4.0.6
4
+ * Build date: Wed Feb 02 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