@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.
- package/CHANGELOG.md +24 -0
- package/bin/syncfusion-license.js +1 -1
- package/dist/ej2-base.min.js +2 -2
- package/dist/ej2-base.umd.min.js +2 -2
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +37 -14
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +37 -14
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +2 -2
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +26 -11
- package/src/component.d.ts +1 -1
- package/src/component.js +1 -1
- package/src/draggable.js +36 -13
package/dist/es6/ej2-base.es5.js
CHANGED
|
@@ -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
|
|
@@ -7883,14 +7883,27 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
|
|
|
7883
7883
|
}
|
|
7884
7884
|
var draEleTop;
|
|
7885
7885
|
var draEleLeft;
|
|
7886
|
-
if (this.
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7886
|
+
if (this.helperElement.classList.contains('e-treeview')) {
|
|
7887
|
+
if (this.dragArea) {
|
|
7888
|
+
this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
|
|
7889
|
+
draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - this.borderWidth.top);
|
|
7890
|
+
draEleLeft = (left - iLeft) < 0 ? this.dragLimit.left : (left - this.borderWidth.left);
|
|
7891
|
+
}
|
|
7892
|
+
else {
|
|
7893
|
+
draEleTop = top - this.borderWidth.top;
|
|
7894
|
+
draEleLeft = left - this.borderWidth.left;
|
|
7895
|
+
}
|
|
7890
7896
|
}
|
|
7891
7897
|
else {
|
|
7892
|
-
|
|
7893
|
-
|
|
7898
|
+
if (this.dragArea) {
|
|
7899
|
+
this.dragLimit.top = this.clone ? this.dragLimit.top : 0;
|
|
7900
|
+
draEleTop = (top - iTop) < 0 ? this.dragLimit.top : (top - iTop);
|
|
7901
|
+
draEleLeft = (left - iLeft) < 0 ? this.dragElePosition.left : (left - iLeft);
|
|
7902
|
+
}
|
|
7903
|
+
else {
|
|
7904
|
+
draEleTop = top - iTop;
|
|
7905
|
+
draEleLeft = left - iLeft;
|
|
7906
|
+
}
|
|
7894
7907
|
}
|
|
7895
7908
|
var marginTop = parseFloat(getComputedStyle(this.element).marginTop);
|
|
7896
7909
|
// when drag-element has margin-top
|
|
@@ -7923,6 +7936,11 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
|
|
|
7923
7936
|
}
|
|
7924
7937
|
}
|
|
7925
7938
|
}
|
|
7939
|
+
if (this.dragArea && this.helperElement.classList.contains('e-treeview')) {
|
|
7940
|
+
var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop)
|
|
7941
|
+
+ parseFloat(styles.marginBottom));
|
|
7942
|
+
draEleTop = (draEleTop + helperHeight) > this.dragLimit.bottom ? (this.dragLimit.bottom - helperHeight) : draEleTop;
|
|
7943
|
+
}
|
|
7926
7944
|
/* istanbul ignore next */
|
|
7927
7945
|
// if(this.eleTop > 0) {
|
|
7928
7946
|
// draEleTop += this.eleTop;
|
|
@@ -7983,19 +8001,19 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
|
|
|
7983
8001
|
};
|
|
7984
8002
|
Draggable.prototype.getScrollPosition = function (nodeEle, draEleTop) {
|
|
7985
8003
|
if (nodeEle && nodeEle === document.scrollingElement) {
|
|
7986
|
-
if ((nodeEle.clientHeight
|
|
7987
|
-
&& nodeEle.getBoundingClientRect().height > draEleTop) {
|
|
8004
|
+
if ((nodeEle.clientHeight + document.scrollingElement.scrollTop - this.helperElement.clientHeight) < draEleTop
|
|
8005
|
+
&& nodeEle.getBoundingClientRect().height + this.parentClientRect.top > draEleTop) {
|
|
7988
8006
|
nodeEle.scrollTop += this.helperElement.clientHeight;
|
|
7989
8007
|
}
|
|
7990
|
-
else if (nodeEle.
|
|
8008
|
+
else if (nodeEle.scrollTop > draEleTop - this.helperElement.clientHeight) {
|
|
7991
8009
|
nodeEle.scrollTop -= this.helperElement.clientHeight;
|
|
7992
8010
|
}
|
|
7993
8011
|
}
|
|
7994
8012
|
else if (nodeEle && nodeEle !== document.scrollingElement) {
|
|
7995
|
-
if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight) < draEleTop) {
|
|
8013
|
+
if ((nodeEle.clientHeight + nodeEle.getBoundingClientRect().top - this.helperElement.clientHeight + document.scrollingElement.scrollTop) < draEleTop) {
|
|
7996
8014
|
nodeEle.scrollTop += this.helperElement.clientHeight;
|
|
7997
8015
|
}
|
|
7998
|
-
else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight)) {
|
|
8016
|
+
else if (nodeEle.getBoundingClientRect().top > (draEleTop - this.helperElement.clientHeight - document.scrollingElement.scrollTop)) {
|
|
7999
8017
|
nodeEle.scrollTop -= this.helperElement.clientHeight;
|
|
8000
8018
|
}
|
|
8001
8019
|
}
|
|
@@ -8098,7 +8116,7 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
|
|
|
8098
8116
|
if (ele) {
|
|
8099
8117
|
var elementArea = ele.getBoundingClientRect();
|
|
8100
8118
|
eleWidthBound = ele.scrollWidth ? ele.scrollWidth : elementArea.right - elementArea.left;
|
|
8101
|
-
eleHeightBound = ele.scrollHeight ? ele.scrollHeight : elementArea.bottom - elementArea.top;
|
|
8119
|
+
eleHeightBound = ele.scrollHeight ? (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) ? ele.clientHeight : ele.scrollHeight : elementArea.bottom - elementArea.top;
|
|
8102
8120
|
var keys = ['Top', 'Left', 'Bottom', 'Right'];
|
|
8103
8121
|
var styles = getComputedStyle(ele);
|
|
8104
8122
|
for (var i = 0; i < keys.length; i++) {
|
|
@@ -8109,7 +8127,12 @@ var Draggable = /** @__PURE__ @class */ (function (_super) {
|
|
|
8109
8127
|
this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder);
|
|
8110
8128
|
this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
|
|
8111
8129
|
}
|
|
8112
|
-
|
|
8130
|
+
if (this.dragArea && !isNullOrUndefined(this.helperElement) && this.helperElement.classList.contains('e-treeview')) {
|
|
8131
|
+
top = elementArea.top + document.scrollingElement.scrollTop;
|
|
8132
|
+
}
|
|
8133
|
+
else {
|
|
8134
|
+
top = elementArea.top;
|
|
8135
|
+
}
|
|
8113
8136
|
left = elementArea.left;
|
|
8114
8137
|
this.dragLimit.left = left + this.borderWidth.left + this.padding.left;
|
|
8115
8138
|
this.dragLimit.top = ele.offsetTop + this.borderWidth.top + this.padding.top;
|