@syncfusion/ej2-base 20.3.49 → 20.3.56

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.
@@ -7123,7 +7123,9 @@ let Component = class Component extends Base {
7123
7123
  }
7124
7124
  //tslint:disable-next-line
7125
7125
  renderReactTemplates(callback) {
7126
- //No Code
7126
+ if (!isNullOrUndefined(callback)) {
7127
+ callback();
7128
+ }
7127
7129
  }
7128
7130
  // eslint-disable-next-line
7129
7131
  clearTemplate(templateName, index) {
@@ -7654,14 +7656,27 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7654
7656
  }
7655
7657
  let draEleTop;
7656
7658
  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 - this.borderWidth.top);
7660
- draEleLeft = (left - iLeft) < 0 ? this.dragLimit.left : (left - this.borderWidth.left);
7659
+ if (this.helperElement.classList.contains('e-treeview')) {
7660
+ if (this.dragArea) {
7661
+ this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7662
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - this.borderWidth.top);
7663
+ draEleLeft = (left - iLeft) < 0 ? this.dragLimit.left : (left - this.borderWidth.left);
7664
+ }
7665
+ else {
7666
+ draEleTop = top - this.borderWidth.top;
7667
+ draEleLeft = left - this.borderWidth.left;
7668
+ }
7661
7669
  }
7662
7670
  else {
7663
- draEleTop = top - this.borderWidth.top;
7664
- draEleLeft = left - this.borderWidth.left;
7671
+ if (this.dragArea) {
7672
+ this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7673
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
7674
+ draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
7675
+ }
7676
+ else {
7677
+ draEleTop = top - iTop;
7678
+ draEleLeft = left - iLeft;
7679
+ }
7665
7680
  }
7666
7681
  let marginTop = parseFloat(getComputedStyle(this.element).marginTop);
7667
7682
  // when drag-element has margin-top
@@ -7694,7 +7709,7 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7694
7709
  }
7695
7710
  }
7696
7711
  }
7697
- if (this.dragArea) {
7712
+ if (this.dragArea && this.helperElement.classList.contains('e-treeview')) {
7698
7713
  let helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop)
7699
7714
  + parseFloat(styles.marginBottom));
7700
7715
  draEleTop = (draEleTop + helperHeight) > this.dragLimit.bottom ? (this.dragLimit.bottom - helperHeight) : draEleTop;
@@ -7768,7 +7783,7 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7768
7783
  }
7769
7784
  }
7770
7785
  else if (nodeEle && nodeEle !== document.scrollingElement) {
7771
- if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop - this.borderWidth.top - this.borderWidth.bottom) <= draEleTop) {
7786
+ if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop) < draEleTop) {
7772
7787
  nodeEle.scrollTop += this.helperElement.clientHeight;
7773
7788
  }
7774
7789
  else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight - document.scrollingElement.scrollTop)) {
@@ -7874,7 +7889,7 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7874
7889
  if (ele) {
7875
7890
  let elementArea = ele.getBoundingClientRect();
7876
7891
  eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
7877
- eleHeightBound = ele.scrollHeight ? (this.dragArea && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
7892
+ eleHeightBound = ele.scrollHeight ? (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
7878
7893
  let keys = ['Top', 'Left', 'Bottom', 'Right'];
7879
7894
  let styles = getComputedStyle(ele);
7880
7895
  for (let i = 0; i < keys.length; i++) {
@@ -7885,7 +7900,12 @@ let Draggable = Draggable_1 = class Draggable extends Base {
7885
7900
  this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
7886
7901
  this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
7887
7902
  }
7888
- top = elementArea.top + document.scrollingElement.scrollTop;
7903
+ if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) {
7904
+ top = elementArea.top + document.scrollingElement.scrollTop;
7905
+ }
7906
+ else {
7907
+ top = elementArea.top;
7908
+ }
7889
7909
  left = elementArea.left;
7890
7910
  this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
7891
7911
  this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;