@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.
@@ -1021,11 +1021,11 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1021
1021
  var flexPaneIndexes = [];
1022
1022
  var flexCount = 0;
1023
1023
  var children = this.element.children;
1024
- for (var i = 0; i < children.length; i++) {
1024
+ for (var i = 0, len = children.length; i < len; i++) {
1025
1025
  totalWidth += this.orientation === 'Horizontal' ? children[i].offsetWidth :
1026
1026
  children[i].offsetHeight;
1027
1027
  }
1028
- for (var j = 0; j < this.allBars.length; j++) {
1028
+ for (var j = 0, len = this.allBars.length; j < len; j++) {
1029
1029
  totalWidth += this.orientation === 'Horizontal' ? parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) +
1030
1030
  parseInt(getComputedStyle(this.allBars[j]).marginLeft, 10) : parseInt(getComputedStyle(this.allBars[j]).marginTop, 10) +
1031
1031
  parseInt(getComputedStyle(this.allBars[j]).marginBottom, 10);
@@ -1033,14 +1033,15 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1033
1033
  var diff = this.orientation === 'Horizontal' ? this.element.offsetWidth -
1034
1034
  ((this.border * 2) + totalWidth) :
1035
1035
  this.element.offsetHeight - ((this.border * 2) + totalWidth);
1036
- for (var i = 0; i < this.allPanes.length; i++) {
1037
- if (!this.paneSettings[i].size && !(this.allPanes[i].innerText === '')) {
1036
+ for (var i = 0, len = this.allPanes.length; i < len; i++) {
1037
+ if (this.allPanes[i].innerText === '' ? !(this.paneSettings[i].size) || !(this.allPanes[i].innerText === '')
1038
+ : !(this.paneSettings[i].size) && !(this.allPanes[i].innerText === '')) {
1038
1039
  flexPaneIndexes[flexCount] = i;
1039
1040
  flexCount++;
1040
1041
  }
1041
1042
  }
1042
1043
  var avgDiffWidth = diff / flexPaneIndexes.length;
1043
- for (var j = 0; j < flexPaneIndexes.length; j++) {
1044
+ for (var j = 0, len = flexPaneIndexes.length; j < len; j++) {
1044
1045
  this.allPanes[flexPaneIndexes[j]].style.flexBasis = this.orientation === 'Horizontal' ?
1045
1046
  (this.allPanes[flexPaneIndexes[j]].offsetWidth + avgDiffWidth) + 'px' :
1046
1047
  (this.allPanes[flexPaneIndexes[j]].offsetHeight + avgDiffWidth) + 'px';
@@ -1117,15 +1118,7 @@ var Splitter = /** @__PURE__ @class */ (function (_super) {
1117
1118
  if (icon.classList.contains(ARROW_RIGHT) || icon.classList.contains(ARROW_DOWN)) {
1118
1119
  this.expandAction(e);
1119
1120
  }
1120
- var totalWidth = 0;
1121
- var children = this.element.children;
1122
- for (var i = 0; i < children.length; i++) {
1123
- totalWidth += this.orientation === 'Horizontal' ? children[i].offsetWidth :
1124
- children[i].offsetHeight;
1125
- }
1126
- if (totalWidth > this.element.offsetWidth) {
1127
- this.updateSplitterSize();
1128
- }
1121
+ this.updateSplitterSize();
1129
1122
  };
1130
1123
  Splitter.prototype.expandAction = function (e) {
1131
1124
  var _this = this;
@@ -3841,7 +3834,7 @@ var DashboardLayout = /** @__PURE__ @class */ (function (_super) {
3841
3834
  }
3842
3835
  var isSwappable = false;
3843
3836
  for (var count1 = 0; count1 < collisions.length; count1++) {
3844
- if (collisions.length >= 1 && this.cloneObject[this.mainElement.id].row === this.oldRowCol[this.mainElement.id].row) {
3837
+ if (collisions.length >= 1 && this.cloneObject[this.mainElement.id] && this.cloneObject[this.mainElement.id].row === this.oldRowCol[this.mainElement.id].row) {
3845
3838
  return false;
3846
3839
  }
3847
3840
  }