@syncfusion/ej2-layouts 19.4.38 → 19.4.52

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.
@@ -97,23 +97,6 @@ let Splitter = class Splitter extends Component {
97
97
  */
98
98
  constructor(options, element) {
99
99
  super(options, element);
100
- this.allPanes = [];
101
- this.paneOrder = [];
102
- this.separatorOrder = [];
103
- this.allBars = [];
104
- this.previousCoordinates = {};
105
- this.currentCoordinates = {};
106
- this.updatePrePaneInPercentage = false;
107
- this.updateNextPaneInPercentage = false;
108
- this.panesDimensions = [];
109
- this.border = 0;
110
- this.validDataAttributes = ['data-size', 'data-min', 'data-max', 'data-collapsible',
111
- 'data-resizable', 'data-content', 'data-collapsed'];
112
- this.validElementAttributes = ['data-orientation', 'data-width', 'data-height'];
113
- this.iconsDelay = 300;
114
- this.templateElement = [];
115
- this.collapseFlag = false;
116
- this.expandFlag = true;
117
100
  }
118
101
  /**
119
102
  * Gets called when the model property changes.The data that describes the old and new values of the property that changed.
@@ -235,7 +218,27 @@ let Splitter = class Splitter extends Component {
235
218
  }
236
219
  this.allPanes[index].classList.add(STATIC_PANE);
237
220
  }
221
+ initializeValues() {
222
+ this.allPanes = [];
223
+ this.paneOrder = [];
224
+ this.separatorOrder = [];
225
+ this.allBars = [];
226
+ this.previousCoordinates = {};
227
+ this.currentCoordinates = {};
228
+ this.updatePrePaneInPercentage = false;
229
+ this.updateNextPaneInPercentage = false;
230
+ this.panesDimensions = [];
231
+ this.border = 0;
232
+ this.validDataAttributes = ['data-size', 'data-min', 'data-max', 'data-collapsible',
233
+ 'data-resizable', 'data-content', 'data-collapsed'];
234
+ this.validElementAttributes = ['data-orientation', 'data-width', 'data-height'];
235
+ this.iconsDelay = 300;
236
+ this.templateElement = [];
237
+ this.collapseFlag = false;
238
+ this.expandFlag = true;
239
+ }
238
240
  preRender() {
241
+ this.initializeValues();
239
242
  this.onReportWindowSize = this.reportWindowSize.bind(this);
240
243
  this.onMouseMoveHandler = this.onMouseMove.bind(this);
241
244
  this.onMouseUpHandler = this.onMouseUp.bind(this);
@@ -1561,7 +1564,7 @@ let Splitter = class Splitter extends Component {
1561
1564
  }
1562
1565
  getSeparatorPosition(e) {
1563
1566
  this.updateCursorPosition(e, 'current');
1564
- const rectBound = (this.orientation === 'Horizontal') ? this.element.getBoundingClientRect().left :
1567
+ const rectBound = (this.orientation === 'Horizontal') ? this.element.getBoundingClientRect().left + window.scrollX :
1565
1568
  this.element.getBoundingClientRect().top + window.scrollY;
1566
1569
  const offSet = (this.orientation === 'Horizontal') ? this.element.offsetWidth : this.element.offsetHeight;
1567
1570
  return this.calcDragPosition(rectBound, offSet);
@@ -1838,7 +1841,7 @@ let Splitter = class Splitter extends Component {
1838
1841
  }
1839
1842
  }
1840
1843
  validateDraggedPosition(draggedPos, prevPaneHeightWidth, nextPaneHeightWidth) {
1841
- const separatorTopLeft = (this.orientation === 'Horizontal') ? this.currentSeparator.offsetLeft :
1844
+ const separatorTopLeft = (this.orientation === 'Horizontal') ? this.currentSeparator.offsetLeft + window.scrollX :
1842
1845
  this.currentSeparator.offsetTop;
1843
1846
  const prePaneRange = separatorTopLeft - prevPaneHeightWidth;
1844
1847
  const nextPaneRange = nextPaneHeightWidth + separatorTopLeft;
@@ -3083,8 +3086,9 @@ let DashboardLayout = class DashboardLayout extends Component {
3083
3086
  else {
3084
3087
  if (this.element.classList.contains(responsive)) {
3085
3088
  removeClass([this.element], [responsive]);
3086
- for (let i = 0; i < this.element.querySelectorAll('.e-panel').length; i++) {
3087
- const ele = this.element.querySelectorAll('.e-panel')[i];
3089
+ const internalPanels = this.element.querySelectorAll(((this.element.id) ? '#' + this.element.id + ' > ' : '') + '.e-panel');
3090
+ for (let i = 0; i < internalPanels.length; i++) {
3091
+ const ele = internalPanels[i];
3088
3092
  const cellInstance = this.getCellInstance(ele.id);
3089
3093
  const row = parseInt(ele.getAttribute('data-row'), 10);
3090
3094
  const col = parseInt(ele.getAttribute('data-col'), 10);