@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.
@@ -7323,7 +7323,9 @@ var Component = /** @__PURE__ @class */ (function (_super) {
7323
7323
  };
7324
7324
  //tslint:disable-next-line
7325
7325
  Component.prototype.renderReactTemplates = function (callback) {
7326
- //No Code
7326
+ if (!isNullOrUndefined(callback)) {
7327
+ callback();
7328
+ }
7327
7329
  };
7328
7330
  // eslint-disable-next-line
7329
7331
  Component.prototype.clearTemplate = function (templateName, index) {
@@ -7883,14 +7885,27 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
7883
7885
  }
7884
7886
  var draEleTop;
7885
7887
  var draEleLeft;
7886
- if (this.dragArea) {
7887
- this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7888
- draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - this.borderWidth.top);
7889
- draEleLeft = (left - iLeft) < 0 ? this.dragLimit.left : (left - this.borderWidth.left);
7888
+ if (this.helperElement.classList.contains('e-treeview')) {
7889
+ if (this.dragArea) {
7890
+ this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7891
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - this.borderWidth.top);
7892
+ draEleLeft = (left - iLeft) < 0 ? this.dragLimit.left : (left - this.borderWidth.left);
7893
+ }
7894
+ else {
7895
+ draEleTop = top - this.borderWidth.top;
7896
+ draEleLeft = left - this.borderWidth.left;
7897
+ }
7890
7898
  }
7891
7899
  else {
7892
- draEleTop = top - this.borderWidth.top;
7893
- draEleLeft = left - this.borderWidth.left;
7900
+ if (this.dragArea) {
7901
+ this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7902
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
7903
+ draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
7904
+ }
7905
+ else {
7906
+ draEleTop = top - iTop;
7907
+ draEleLeft = left - iLeft;
7908
+ }
7894
7909
  }
7895
7910
  var marginTop = parseFloat(getComputedStyle(this.element).marginTop);
7896
7911
  // when drag-element has margin-top
@@ -7923,7 +7938,7 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
7923
7938
  }
7924
7939
  }
7925
7940
  }
7926
- if (this.dragArea) {
7941
+ if (this.dragArea && this.helperElement.classList.contains('e-treeview')) {
7927
7942
  var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop)
7928
7943
  + parseFloat(styles.marginBottom));
7929
7944
  draEleTop = (draEleTop + helperHeight) > this.dragLimit.bottom ? (this.dragLimit.bottom - helperHeight) : draEleTop;
@@ -7997,7 +8012,7 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
7997
8012
  }
7998
8013
  }
7999
8014
  else if (nodeEle && nodeEle !== document.scrollingElement) {
8000
- if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop - this.borderWidth.top - this.borderWidth.bottom) <= draEleTop) {
8015
+ if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop) < draEleTop) {
8001
8016
  nodeEle.scrollTop += this.helperElement.clientHeight;
8002
8017
  }
8003
8018
  else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight - document.scrollingElement.scrollTop)) {
@@ -8103,7 +8118,7 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
8103
8118
  if (ele) {
8104
8119
  var elementArea = ele.getBoundingClientRect();
8105
8120
  eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
8106
- eleHeightBound = ele.scrollHeight ? (this.dragArea && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
8121
+ eleHeightBound = ele.scrollHeight ? (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
8107
8122
  var keys = ['Top', 'Left', 'Bottom', 'Right'];
8108
8123
  var styles = getComputedStyle(ele);
8109
8124
  for (var i = 0; i < keys.length; i++) {
@@ -8114,7 +8129,12 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
8114
8129
  this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
8115
8130
  this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
8116
8131
  }
8117
- top = elementArea.top + document.scrollingElement.scrollTop;
8132
+ if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) {
8133
+ top = elementArea.top + document.scrollingElement.scrollTop;
8134
+ }
8135
+ else {
8136
+ top = elementArea.top;
8137
+ }
8118
8138
  left = elementArea.left;
8119
8139
  this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
8120
8140
  this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;