@syncfusion/ej2-layouts 28.2.3 → 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.
@@ -4532,16 +4532,17 @@ let DashboardLayout = class DashboardLayout extends Component {
4532
4532
  this.updateRowsHeight(eleRowValue, eleSizeY, eleSizeY);
4533
4533
  this.updateDragArea();
4534
4534
  this.shadowEle = document.createElement('div');
4535
- this.shadowEle.classList.add('e-holder');
4536
- this.shadowEle.classList.add('e-holder-transition');
4535
+ this.shadowEle.classList.add('e-holder', 'e-holder-transition');
4537
4536
  setStyleAttribute(this.shadowEle, { 'position': 'absolute' });
4538
4537
  addClass([this.element], [preventSelect]);
4539
4538
  addClass([args.element], [dragging]);
4540
4539
  this.element.appendChild(this.shadowEle);
4541
4540
  this.renderReactTemplates();
4542
4541
  this.shadowEle = document.querySelector('.e-holder');
4543
- this.shadowEle.style.height = (this.getCellInstance(args.element.id).sizeY * this.cellSize[1]) + 'px';
4544
- this.shadowEle.style.width = (this.getCellInstance(args.element.id).sizeX * this.cellSize[0]) + 'px';
4542
+ const panelValues = this.getCellInstance(args.element.id);
4543
+ const shadowSize = this.calculateShadowElementSize(panelValues.sizeX, panelValues.sizeY);
4544
+ this.shadowEle.style.height = shadowSize.height;
4545
+ this.shadowEle.style.width = shadowSize.width;
4545
4546
  const panelInstance = this.getCellInstance(args.element.id);
4546
4547
  this.setPanelPosition(this.shadowEle, panelInstance.row, panelInstance.col);
4547
4548
  }
@@ -4677,12 +4678,17 @@ let DashboardLayout = class DashboardLayout extends Component {
4677
4678
  const heightValue = this.getCellSize()[1];
4678
4679
  const top = row === 0 ? 0 : (((row) * (heightValue + this.cellSpacing[1])));
4679
4680
  const left = col === 0 ? 0 : (((col) * (widthValue + this.cellSpacing[0])));
4680
- const cellSizeOne = this.getCellSize()[1];
4681
- const cellSizeZero = this.getCellSize()[0];
4682
4681
  this.elementRef.top = this.shadowEle.style.top = top + 'px';
4683
4682
  this.elementRef.left = this.shadowEle.style.left = left + 'px';
4684
- this.elementRef.height = this.shadowEle.style.height = ((sizeY * cellSizeOne) + ((sizeY - 1) * this.cellSpacing[1])) + 'px';
4685
- this.elementRef.width = this.shadowEle.style.width = ((sizeX * cellSizeZero) + ((sizeX - 1) * this.cellSpacing[0])) + 'px';
4683
+ const shadowSize = this.calculateShadowElementSize(sizeX, sizeY);
4684
+ this.elementRef.height = this.shadowEle.style.height = shadowSize.height;
4685
+ this.elementRef.width = this.shadowEle.style.width = shadowSize.width;
4686
+ }
4687
+ calculateShadowElementSize(sizeX, sizeY) {
4688
+ return {
4689
+ width: (sizeX * this.cellSize[0]) + ((sizeX - 1) * this.cellSpacing[0]) + 'px',
4690
+ height: (sizeY * this.cellSize[1]) + ((sizeY - 1) * this.cellSpacing[1]) + 'px'
4691
+ };
4686
4692
  }
4687
4693
  getCellInstance(idValue) {
4688
4694
  let currentCellInstance;