@syncfusion/ej2-base 20.3.48 → 20.3.49

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.
@@ -7322,7 +7322,7 @@ var Component = /** @__PURE__ @class */ (function (_super) {
7322
7322
  }
7323
7323
  };
7324
7324
  //tslint:disable-next-line
7325
- Component.prototype.renderReactTemplates = function () {
7325
+ Component.prototype.renderReactTemplates = function (callback) {
7326
7326
  //No Code
7327
7327
  };
7328
7328
  // eslint-disable-next-line
@@ -7885,12 +7885,12 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
7885
7885
  var draEleLeft;
7886
7886
  if (this.dragArea) {
7887
7887
  this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
7888
- draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
7889
- draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
7888
+ draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - this.borderWidth.top);
7889
+ draEleLeft = (left - iLeft) < 0 ? this.dragLimit.left : (left - this.borderWidth.left);
7890
7890
  }
7891
7891
  else {
7892
- draEleTop = top - iTop;
7893
- draEleLeft = left - iLeft;
7892
+ draEleTop = top - this.borderWidth.top;
7893
+ draEleLeft = left - this.borderWidth.left;
7894
7894
  }
7895
7895
  var marginTop = parseFloat(getComputedStyle(this.element).marginTop);
7896
7896
  // when drag-element has margin-top
@@ -7923,6 +7923,11 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
7923
7923
  }
7924
7924
  }
7925
7925
  }
7926
+ if (this.dragArea) {
7927
+ var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop)
7928
+ + parseFloat(styles.marginBottom));
7929
+ draEleTop = (draEleTop + helperHeight) > this.dragLimit.bottom ? (this.dragLimit.bottom - helperHeight) : draEleTop;
7930
+ }
7926
7931
  /* istanbul ignore next */
7927
7932
  // if(this.eleTop > 0) {
7928
7933
  // draEleTop += this.eleTop;
@@ -7983,19 +7988,19 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
7983
7988
  };
7984
7989
  Draggable.prototype.getScrollPosition = function (nodeEle, draEleTop) {
7985
7990
  if (nodeEle && nodeEle === document.scrollingElement) {
7986
- if ((nodeEle.clientHeight - nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop
7987
- && nodeEle.getBoundingClientRect().height > draEleTop) {
7991
+ if ((nodeEle.clientHeight + document.scrollingElement.scrollTop - this.helperElement.clientHeight) < draEleTop
7992
+ && nodeEle.getBoundingClientRect().height + this.parentClientRect.top > draEleTop) {
7988
7993
  nodeEle.scrollTop += this.helperElement.clientHeight;
7989
7994
  }
7990
- else if (nodeEle.scrollHeight - nodeEle.clientHeight > draEleTop) {
7995
+ else if (nodeEle.scrollTop > draEleTop - this.helperElement.clientHeight) {
7991
7996
  nodeEle.scrollTop -= this.helperElement.clientHeight;
7992
7997
  }
7993
7998
  }
7994
7999
  else if (nodeEle && nodeEle !== document.scrollingElement) {
7995
- if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop) {
8000
+ if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop - this.borderWidth.top - this.borderWidth.bottom) <= draEleTop) {
7996
8001
  nodeEle.scrollTop += this.helperElement.clientHeight;
7997
8002
  }
7998
- else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight)) {
8003
+ else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight - document.scrollingElement.scrollTop)) {
7999
8004
  nodeEle.scrollTop -= this.helperElement.clientHeight;
8000
8005
  }
8001
8006
  }
@@ -8098,7 +8103,7 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
8098
8103
  if (ele) {
8099
8104
  var elementArea = ele.getBoundingClientRect();
8100
8105
  eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
8101
- eleHeightBound = ele.scrollHeight ? ele.scrollHeight : elementArea.bottom - elementArea.top;
8106
+ eleHeightBound = ele.scrollHeight ? (this.dragArea && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
8102
8107
  var keys = ['Top', 'Left', 'Bottom', 'Right'];
8103
8108
  var styles = getComputedStyle(ele);
8104
8109
  for (var i = 0; i < keys.length; i++) {
@@ -8109,7 +8114,7 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
8109
8114
  this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
8110
8115
  this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
8111
8116
  }
8112
- top = elementArea.top;
8117
+ top = elementArea.top + document.scrollingElement.scrollTop;
8113
8118
  left = elementArea.left;
8114
8119
  this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
8115
8120
  this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;