@syncfusion/ej2-gantt 22.2.7 → 22.2.8

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.
@@ -4080,6 +4080,7 @@ var chartRowCell = 'e-chart-row-cell';
4080
4080
  var chartRow = 'e-chart-row';
4081
4081
  var rowExpand = 'e-row-expand';
4082
4082
  var rowCollapse = 'e-row-collapse';
4083
+ var collapseParent = 'e-collapse-parent';
4083
4084
  var taskBarLeftResizer = 'e-taskbar-left-resizer';
4084
4085
  var taskBarRightResizer = 'e-taskbar-right-resizer';
4085
4086
  var childProgressResizer = 'e-child-progress-resizer';
@@ -10931,6 +10932,18 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
10931
10932
  }
10932
10933
  }
10933
10934
  else if (taskbarElement) {
10935
+ if (taskbarElement && this.parent.enableVirtualization && !args.data.expanded) {
10936
+ var childElement = trElement.querySelector('.' + collapseParent);
10937
+ if (childElement) {
10938
+ for (var i = 0; i < childElement.childNodes.length; i++) {
10939
+ var taskbar = childElement.childNodes[i];
10940
+ var mainTaskbar = taskbar.querySelector('.' + traceChildTaskBar);
10941
+ if (mainTaskbar) {
10942
+ mainTaskbar.style.backgroundColor = args.taskbarBgColor;
10943
+ }
10944
+ }
10945
+ }
10946
+ }
10934
10947
  if (taskbarElement.querySelector(classCollections[0]) &&
10935
10948
  getComputedStyle(taskbarElement.querySelector(classCollections[0])).backgroundColor !== args.taskbarBgColor) {
10936
10949
  taskbarElement.querySelector(classCollections[0]).style.backgroundColor = args.taskbarBgColor;
@@ -11202,10 +11215,10 @@ var ChartRows = /** @__PURE__ @class */ (function (_super) {
11202
11215
  this.templateData = record;
11203
11216
  var parentTrNode = this.getTableTrNode();
11204
11217
  var leftLabelNode = this.leftLabelContainer();
11205
- var collapseParent = createElement('div', {
11218
+ var collapseParent$$1 = createElement('div', {
11206
11219
  className: 'e-collapse-parent'
11207
11220
  });
11208
- parentTrNode[0].childNodes[0].childNodes[0].appendChild(collapseParent);
11221
+ parentTrNode[0].childNodes[0].childNodes[0].appendChild(collapseParent$$1);
11209
11222
  var tasks = this.parent.dataOperation.setSortedChildTasks(record);
11210
11223
  this.parent.dataOperation.updateOverlappingIndex(tasks);
11211
11224
  var tRow;
@@ -13459,35 +13472,34 @@ var Tooltip$1 = /** @__PURE__ @class */ (function () {
13459
13472
  */
13460
13473
  Tooltip$$1.prototype.updateTooltipPosition = function (args) {
13461
13474
  args.element.style.visibility = 'visible';
13462
- if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
13463
- return;
13464
- }
13465
- var postion = this.getPointorPosition(this.tooltipMouseEvent);
13466
- var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
13467
- var topEnd = containerPosition.top + this.parent.chartPane.offsetHeight;
13468
- var leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
13469
- var tooltipPositionX = postion.x;
13470
- var tooltipPositionY = postion.y;
13471
- if (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
13472
- while (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
13473
- tooltipPositionX = leftEnd - args.element.offsetWidth - 10;
13474
- args.element.style.left = tooltipPositionX + 'px';
13475
- }
13476
- }
13477
- else {
13478
- tooltipPositionX = tooltipPositionX + 10;
13479
- args.element.style.left = tooltipPositionX + 'px';
13480
- }
13481
- if (window.innerHeight < args.element.offsetHeight + tooltipPositionY) {
13482
- tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
13483
- }
13484
- if ((topEnd < (tooltipPositionY + args.element.offsetHeight + 20))) {
13485
- tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
13486
- }
13487
- else {
13488
- tooltipPositionY = tooltipPositionY + 10;
13489
- }
13490
- args.element.style.top = tooltipPositionY + 'px';
13475
+ // if (isNullOrUndefined(this.tooltipMouseEvent) || args.target.classList.contains('e-notes-info')) {
13476
+ // return;
13477
+ // }
13478
+ // const postion: { x: number, y: number } = this.getPointorPosition(this.tooltipMouseEvent);
13479
+ // const containerPosition: { top: number, left: number, width?: number, height?: number } =
13480
+ // this.parent.getOffsetRect(this.parent.chartPane);
13481
+ // const topEnd: number = containerPosition.top + this.parent.chartPane.offsetHeight;
13482
+ // const leftEnd: number = containerPosition.left + this.parent.chartPane.offsetWidth;
13483
+ // let tooltipPositionX: number = postion.x;
13484
+ // let tooltipPositionY: number = postion.y;
13485
+ // if (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
13486
+ // while (leftEnd < (tooltipPositionX + args.element.offsetWidth + 10)) {
13487
+ // tooltipPositionX = leftEnd - args.element.offsetWidth - 10;
13488
+ // args.element.style.left = tooltipPositionX + 'px';
13489
+ // }
13490
+ // } else {
13491
+ // tooltipPositionX = tooltipPositionX + 10;
13492
+ // args.element.style.left = tooltipPositionX + 'px';
13493
+ // }
13494
+ // if (window.innerHeight < args.element.offsetHeight + tooltipPositionY) {
13495
+ // tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
13496
+ // }
13497
+ // if ((topEnd < (tooltipPositionY + args.element.offsetHeight + 20))) {
13498
+ // tooltipPositionY = tooltipPositionY - args.element.offsetHeight - 10;
13499
+ // } else {
13500
+ // tooltipPositionY = tooltipPositionY + 10;
13501
+ // }
13502
+ // args.element.style.top = tooltipPositionY + 'px';
13491
13503
  };
13492
13504
  /**
13493
13505
  * Method to get mouse pointor position
@@ -14924,6 +14936,13 @@ var Gantt = /** @__PURE__ @class */ (function (_super) {
14924
14936
  if (this.enableCriticalPath && criticalModule && criticalModule.criticalPathCollection) {
14925
14937
  this.criticalPathModule.criticalConnectorLine(criticalModule.criticalPathCollection, criticalModule.detailPredecessorCollection, true, criticalModule.predecessorCollectionTaskIds);
14926
14938
  }
14939
+ this.calculateDimensions();
14940
+ var pane1 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[0];
14941
+ var pane2 = this.splitterModule.splitterObject.element.querySelectorAll('.e-pane')[1];
14942
+ this.splitterModule.splitterPreviousPositionGrid = pane1.scrollWidth + 1 + 'px';
14943
+ this.splitterModule.splitterPreviousPositionChart = pane2.scrollWidth + 1 + 'px';
14944
+ this.splitterModule.splitterObject.paneSettings[0].size = this.splitterModule['getSpliterPositionInPercentage'](this.splitterModule.splitterPreviousPositionGrid);
14945
+ this.splitterModule.splitterObject.paneSettings[1].size = this.splitterModule.splitterPreviousPositionChart;
14927
14946
  }
14928
14947
  };
14929
14948
  Gantt.prototype.keyActionHandler = function (e) {
@@ -18518,13 +18537,13 @@ var EditTooltip = /** @__PURE__ @class */ (function () {
18518
18537
  * @returns {void} .
18519
18538
  */
18520
18539
  EditTooltip.prototype.updateTooltipPosition = function (args) {
18521
- var containerPosition = this.parent.getOffsetRect(this.parent.chartPane);
18522
- var leftEnd = containerPosition.left + this.parent.chartPane.offsetWidth;
18523
- var tooltipPositionX = args.element.offsetLeft;
18524
- if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
18525
- tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
18526
- }
18527
- args.element.style.left = tooltipPositionX + 'px';
18540
+ // const containerPosition: { top: number, left: number } = this.parent.getOffsetRect(this.parent.chartPane);
18541
+ // const leftEnd: number = containerPosition.left + this.parent.chartPane.offsetWidth;
18542
+ // let tooltipPositionX: number = args.element.offsetLeft;
18543
+ // if (leftEnd < (tooltipPositionX + args.element.offsetWidth)) {
18544
+ // tooltipPositionX += leftEnd - (tooltipPositionX + args.element.offsetWidth);
18545
+ // }
18546
+ // args.element.style.left = tooltipPositionX + 'px';
18528
18547
  args.element.style.visibility = 'visible';
18529
18548
  };
18530
18549
  /**
@@ -19177,6 +19196,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19177
19196
  */
19178
19197
  TaskbarEdit.prototype.updateMouseDownProperties = function (event) {
19179
19198
  var e = this.getCoordinate(event);
19199
+ var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
19200
+ if (parentWithZoomStyle) {
19201
+ var zoom1 = parseFloat(getComputedStyle(parentWithZoomStyle).zoom);
19202
+ e.pageX = e.pageX / zoom1;
19203
+ e.pageY = e.pageY / zoom1;
19204
+ }
19180
19205
  if (e.pageX || e.pageY) {
19181
19206
  var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
19182
19207
  if (this.parent.enableRtl) {
@@ -19388,6 +19413,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
19388
19413
  TaskbarEdit.prototype.updateMouseMoveProperties = function (event) {
19389
19414
  var containerPosition = this.parent.getOffsetRect(this.parent.ganttChartModule.chartBodyContainer);
19390
19415
  var e = this.getCoordinate(event);
19416
+ var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
19417
+ if (parentWithZoomStyle) {
19418
+ var zoom1 = parseFloat(getComputedStyle(parentWithZoomStyle).zoom);
19419
+ e.pageX = e.pageX / zoom1;
19420
+ e.pageY = e.pageY / zoom1;
19421
+ }
19391
19422
  if (e.pageX || e.pageY) {
19392
19423
  if (this.parent.enableRtl) {
19393
19424
  this.mouseMoveX = Math.abs(e.pageX - (containerPosition.left +
@@ -20779,6 +20810,12 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20779
20810
  };
20780
20811
  // eslint-disable-next-line
20781
20812
  TaskbarEdit.prototype.triggerDependencyEvent = function (e, mouseUp) {
20813
+ var parentWithZoomStyle = this.parent.element.closest('[style*="zoom"]');
20814
+ var zoomedPageY;
20815
+ if (parentWithZoomStyle) {
20816
+ var zoom1 = parseFloat(getComputedStyle(parentWithZoomStyle).zoom);
20817
+ zoomedPageY = e.pageY / zoom1;
20818
+ }
20782
20819
  var fromItem = this.taskBarEditRecord.ganttProperties;
20783
20820
  var toItem = this.connectorSecondRecord ? this.connectorSecondRecord.ganttProperties : null;
20784
20821
  var predecessor;
@@ -20840,7 +20877,7 @@ var TaskbarEdit = /** @__PURE__ @class */ (function (_super) {
20840
20877
  table[1].innerText = toItem.taskName;
20841
20878
  table[2].innerText = this.parent.localeObj.getConstant(currentTarget);
20842
20879
  var tooltipElement = this.parent.connectorLineModule.tooltipTable.parentElement.parentElement;
20843
- if (tooltipElement.offsetTop + tooltipElement.offsetHeight > e.pageY) {
20880
+ if (tooltipElement.offsetTop + tooltipElement.offsetHeight > zoomedPageY) {
20844
20881
  tooltipElement.style.top = (e.pageY - tooltipElement.offsetHeight - 20) + 'px';
20845
20882
  }
20846
20883
  }
@@ -31070,7 +31107,13 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
31070
31107
  }
31071
31108
  break;
31072
31109
  case 'DeleteTask':
31073
- this.parent.editModule.deleteRecord(this.rowData);
31110
+ if ((this.parent.selectionSettings.mode !== 'Cell' && this.parent.selectionModule.selectedRowIndexes.length > 1)
31111
+ || (this.parent.selectionSettings.mode === 'Cell' && this.parent.selectionModule.getSelectedRowCellIndexes().length)) {
31112
+ this.parent.editModule.startDeleteAction();
31113
+ }
31114
+ else {
31115
+ this.parent.editModule.deleteRecord(this.rowData);
31116
+ }
31074
31117
  break;
31075
31118
  case 'ToTask':
31076
31119
  if (!isNullOrUndefined(this.rowData)) {