@syncfusion/ej2-layouts 28.1.33 → 28.2.4

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.
@@ -4612,16 +4612,17 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4612
4612
  this.updateRowsHeight(eleRowValue, eleSizeY, eleSizeY);
4613
4613
  this.updateDragArea();
4614
4614
  this.shadowEle = document.createElement('div');
4615
- this.shadowEle.classList.add('e-holder');
4616
- this.shadowEle.classList.add('e-holder-transition');
4615
+ this.shadowEle.classList.add('e-holder', 'e-holder-transition');
4617
4616
  setStyleAttribute(this.shadowEle, { 'position': 'absolute' });
4618
4617
  addClass([this.element], [preventSelect]);
4619
4618
  addClass([args.element], [dragging]);
4620
4619
  this.element.appendChild(this.shadowEle);
4621
4620
  this.renderReactTemplates();
4622
4621
  this.shadowEle = document.querySelector('.e-holder');
4623
- this.shadowEle.style.height = (this.getCellInstance(args.element.id).sizeY * this.cellSize[1]) + 'px';
4624
- this.shadowEle.style.width = (this.getCellInstance(args.element.id).sizeX * this.cellSize[0]) + 'px';
4622
+ var panelValues = this.getCellInstance(args.element.id);
4623
+ var shadowSize = this.calculateShadowElementSize(panelValues.sizeX, panelValues.sizeY);
4624
+ this.shadowEle.style.height = shadowSize.height;
4625
+ this.shadowEle.style.width = shadowSize.width;
4625
4626
  var panelInstance = this.getCellInstance(args.element.id);
4626
4627
  this.setPanelPosition(this.shadowEle, panelInstance.row, panelInstance.col);
4627
4628
  }
@@ -4757,12 +4758,17 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
4757
4758
  var heightValue = this.getCellSize()[1];
4758
4759
  var top = row === 0 ? 0 : (((row) * (heightValue + this.cellSpacing[1])));
4759
4760
  var left = col === 0 ? 0 : (((col) * (widthValue + this.cellSpacing[0])));
4760
- var cellSizeOne = this.getCellSize()[1];
4761
- var cellSizeZero = this.getCellSize()[0];
4762
4761
  this.elementRef.top = this.shadowEle.style.top = top + 'px';
4763
4762
  this.elementRef.left = this.shadowEle.style.left = left + 'px';
4764
- this.elementRef.height = this.shadowEle.style.height = ((sizeY * cellSizeOne) + ((sizeY - 1) * this.cellSpacing[1])) + 'px';
4765
- this.elementRef.width = this.shadowEle.style.width = ((sizeX * cellSizeZero) + ((sizeX - 1) * this.cellSpacing[0])) + 'px';
4763
+ var shadowSize = this.calculateShadowElementSize(sizeX, sizeY);
4764
+ this.elementRef.height = this.shadowEle.style.height = shadowSize.height;
4765
+ this.elementRef.width = this.shadowEle.style.width = shadowSize.width;
4766
+ };
4767
+ DashboardLayout.prototype.calculateShadowElementSize = function (sizeX, sizeY) {
4768
+ return {
4769
+ width: (sizeX * this.cellSize[0]) + ((sizeX - 1) * this.cellSpacing[0]) + 'px',
4770
+ height: (sizeY * this.cellSize[1]) + ((sizeY - 1) * this.cellSpacing[1]) + 'px'
4771
+ };
4766
4772
  };
4767
4773
  DashboardLayout.prototype.getCellInstance = function (idValue) {
4768
4774
  var currentCellInstance;