@syncfusion/ej2-base 20.3.48 → 20.3.50

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.
@@ -7122,7 +7122,7 @@ let Component = class Component extends Base {
7122
7122
  }
7123
7123
  }
7124
7124
  //tslint:disable-next-line
7125
- renderReactTemplates() {
7125
+ renderReactTemplates(callback) {
7126
7126
  //No Code
7127
7127
  }
7128
7128
  // eslint-disable-next-line
@@ -7654,14 +7654,27 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7654
7654
  }
7655
7655
  let draEleTop;
7656
7656
  let draEleLeft;
7657
- if (this.dragArea) {
7658
- this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7659
- draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
7660
- draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
7657
+ if (this.helperElement.classList.contains('e-treeview')) {
7658
+ if (this.dragArea) {
7659
+ this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7660
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - this.borderWidth.top);
7661
+ draEleLeft = (left - iLeft) < 0 ? this.dragLimit.left : (left - this.borderWidth.left);
7662
+ }
7663
+ else {
7664
+ draEleTop = top - this.borderWidth.top;
7665
+ draEleLeft = left - this.borderWidth.left;
7666
+ }
7661
7667
  }
7662
7668
  else {
7663
- draEleTop = top - iTop;
7664
- draEleLeft = left - iLeft;
7669
+ if (this.dragArea) {
7670
+ this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7671
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
7672
+ draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
7673
+ }
7674
+ else {
7675
+ draEleTop = top - iTop;
7676
+ draEleLeft = left - iLeft;
7677
+ }
7665
7678
  }
7666
7679
  let marginTop = parseFloat(getComputedStyle(this.element).marginTop);
7667
7680
  // when drag-element has margin-top
@@ -7694,6 +7707,11 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7694
7707
  }
7695
7708
  }
7696
7709
  }
7710
+ if (this.dragArea && this.helperElement.classList.contains('e-treeview')) {
7711
+ let helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop)
7712
+ + parseFloat(styles.marginBottom));
7713
+ draEleTop = (draEleTop + helperHeight) > this.dragLimit.bottom ? (this.dragLimit.bottom - helperHeight) : draEleTop;
7714
+ }
7697
7715
  /* istanbul ignore next */
7698
7716
  // if(this.eleTop > 0) {
7699
7717
  // draEleTop += this.eleTop;
@@ -7754,19 +7772,19 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7754
7772
  }
7755
7773
  getScrollPosition(nodeEle, draEleTop) {
7756
7774
  if (nodeEle && nodeEle === document.scrollingElement) {
7757
- if ((nodeEle.clientHeight - nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop
7758
- && nodeEle.getBoundingClientRect().height > draEleTop) {
7775
+ if ((nodeEle.clientHeight + document.scrollingElement.scrollTop - this.helperElement.clientHeight) < draEleTop
7776
+ && nodeEle.getBoundingClientRect().height + this.parentClientRect.top > draEleTop) {
7759
7777
  nodeEle.scrollTop += this.helperElement.clientHeight;
7760
7778
  }
7761
- else if (nodeEle.scrollHeight - nodeEle.clientHeight > draEleTop) {
7779
+ else if (nodeEle.scrollTop > draEleTop - this.helperElement.clientHeight) {
7762
7780
  nodeEle.scrollTop -= this.helperElement.clientHeight;
7763
7781
  }
7764
7782
  }
7765
7783
  else if (nodeEle && nodeEle !== document.scrollingElement) {
7766
- if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop) {
7784
+ if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop) < draEleTop) {
7767
7785
  nodeEle.scrollTop += this.helperElement.clientHeight;
7768
7786
  }
7769
- else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight)) {
7787
+ else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight - document.scrollingElement.scrollTop)) {
7770
7788
  nodeEle.scrollTop -= this.helperElement.clientHeight;
7771
7789
  }
7772
7790
  }
@@ -7869,7 +7887,7 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7869
7887
  if (ele) {
7870
7888
  let elementArea = ele.getBoundingClientRect();
7871
7889
  eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
7872
- eleHeightBound = ele.scrollHeight ? ele.scrollHeight : elementArea.bottom - elementArea.top;
7890
+ eleHeightBound = ele.scrollHeight ? (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
7873
7891
  let keys = ['Top', 'Left', 'Bottom', 'Right'];
7874
7892
  let styles = getComputedStyle(ele);
7875
7893
  for (let i = 0; i < keys.length; i++) {
@@ -7880,7 +7898,12 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7880
7898
  this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
7881
7899
  this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
7882
7900
  }
7883
- top = elementArea.top;
7901
+ if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) {
7902
+ top = elementArea.top + document.scrollingElement.scrollTop;
7903
+ }
7904
+ else {
7905
+ top = elementArea.top;
7906
+ }
7884
7907
  left = elementArea.left;
7885
7908
  this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
7886
7909
  this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;