@syncfusion/ej2-layouts 20.2.36 → 20.2.43

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.
@@ -998,11 +998,11 @@ let Splitter = class Splitter extends Component {
998
998
  const flexPaneIndexes = [];
999
999
  let flexCount = 0;
1000
1000
  const children = this.element.children;
1001
- for (let i = 0; i < children.length; i++) {
1001
+ for (let i = 0, len = children.length; i < len; i++) {
1002
1002
  totalWidth += this.orientation === 'Horizontal' ? children[i].offsetWidth :
1003
1003
  children[i].offsetHeight;
1004
1004
  }
1005
- for (let j = 0; j < this.allBars.length; j++) {
1005
+ for (let j = 0, len = this.allBars.length; j < len; j++) {
1006
1006
  totalWidth += this.orientation === 'Horizontal' ? parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) +
1007
1007
  parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) : parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
1008
1008
  parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
@@ -1010,14 +1010,15 @@ let Splitter = class Splitter extends Component {
1010
1010
  const diff = this.orientation === 'Horizontal' ? this.element.offsetWidth -
1011
1011
  ((this.border * 2) + totalWidth) :
1012
1012
  this.element.offsetHeight - ((this.border * 2) + totalWidth);
1013
- for (let i = 0; i < this.allPanes.length; i++) {
1014
- if (!this.paneSettings[i].size && !(this.allPanes[i].innerText === '')) {
1013
+ for (let i = 0, len = this.allPanes.length; i < len; i++) {
1014
+ if (this.allPanes[i].innerText === '' ? !(this.paneSettings[i].size) || !(this.allPanes[i].innerText === '')
1015
+ : !(this.paneSettings[i].size) && !(this.allPanes[i].innerText === '')) {
1015
1016
  flexPaneIndexes[flexCount] = i;
1016
1017
  flexCount++;
1017
1018
  }
1018
1019
  }
1019
1020
  const avgDiffWidth = diff / flexPaneIndexes.length;
1020
- for (let j = 0; j < flexPaneIndexes.length; j++) {
1021
+ for (let j = 0, len = flexPaneIndexes.length; j < len; j++) {
1021
1022
  this.allPanes[flexPaneIndexes[j]].style.flexBasis = this.orientation === 'Horizontal' ?
1022
1023
  (this.allPanes[flexPaneIndexes[j]].offsetWidth + avgDiffWidth) + 'px' :
1023
1024
  (this.allPanes[flexPaneIndexes[j]].offsetHeight + avgDiffWidth) + 'px';
@@ -1094,15 +1095,7 @@ let Splitter = class Splitter extends Component {
1094
1095
  if (icon.classList.contains(ARROW_RIGHT) || icon.classList.contains(ARROW_DOWN)) {
1095
1096
  this.expandAction(e);
1096
1097
  }
1097
- let totalWidth = 0;
1098
- const children = this.element.children;
1099
- for (let i = 0; i < children.length; i++) {
1100
- totalWidth += this.orientation === 'Horizontal' ? children[i].offsetWidth :
1101
- children[i].offsetHeight;
1102
- }
1103
- if (totalWidth > this.element.offsetWidth) {
1104
- this.updateSplitterSize();
1105
- }
1098
+ this.updateSplitterSize();
1106
1099
  }
1107
1100
  expandAction(e) {
1108
1101
  this.splitterDetails(e);
@@ -3776,7 +3769,7 @@ let DashboardLayout = class DashboardLayout extends Component {
3776
3769
  }
3777
3770
  let isSwappable = false;
3778
3771
  for (let count1 = 0; count1 < collisions.length; count1++) {
3779
- if (collisions.length >= 1 && this.cloneObject[this.mainElement.id].row === this.oldRowCol[this.mainElement.id].row) {
3772
+ if (collisions.length >= 1 && this.cloneObject[this.mainElement.id] && this.cloneObject[this.mainElement.id].row === this.oldRowCol[this.mainElement.id].row) {
3780
3773
  return false;
3781
3774
  }
3782
3775
  }