@syncfusion/ej2-filemanager 24.1.41 → 24.1.43

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.
@@ -2063,6 +2063,30 @@ function removeItemClass(parent, value) {
2063
2063
  ele[i].classList.remove(value);
2064
2064
  }
2065
2065
  }
2066
+ /**
2067
+ * Remove item class handler
2068
+ *
2069
+ * @param {Element} scrollParent - specifies the scrolling target.
2070
+ * @param {IFileManager} parent - specifies the parent.
2071
+ * @param {string} nodeClass - specifies the node class.
2072
+ * @param {number} screenY - specifies the vertical (Y) coordinate of the mouse cursor position relative to the entire screen.
2073
+ * @param {number} clientY - specifies the vertical (Y) coordinate of the mouse cursor position relative to the target element.
2074
+ * @returns {void}
2075
+ * @private
2076
+ */
2077
+ function scrollHandler(scrollParent, parent, nodeClass, screenY, clientY) {
2078
+ var position;
2079
+ var elementData = scrollParent.getBoundingClientRect();
2080
+ var node = select("." + nodeClass, scrollParent);
2081
+ if ((screenY >= (elementData.top + scrollParent.clientHeight - 30)) && !isNullOrUndefined(node)) {
2082
+ position = (parent.targetModule === 'navigationpane' || parent.targetModule === 'detailsview') ? node.offsetHeight / 2.5 : node.offsetHeight / 4.5;
2083
+ scrollParent.scrollBy(0, position);
2084
+ }
2085
+ if (!isNullOrUndefined(node) && (clientY <= (elementData.top + 30))) {
2086
+ position = (parent.targetModule === 'navigationpane' || parent.targetModule === 'detailsview') ? node.offsetHeight / 2.5 : node.offsetHeight / 4.5;
2087
+ scrollParent.scrollBy(0, -position);
2088
+ }
2089
+ }
2066
2090
  /**
2067
2091
  * Dragging handler
2068
2092
  *
@@ -2083,12 +2107,15 @@ function draggingHandler(parent, args) {
2083
2107
  }
2084
2108
  removeBlur(parent, 'hover');
2085
2109
  var node = null;
2110
+ var scrollParent;
2086
2111
  if (parent.targetModule === 'navigationpane') {
2087
2112
  node = closest(args.target, 'li');
2088
2113
  node.classList.add(HOVER, DROP_FOLDER);
2089
2114
  canDrop = true;
2090
2115
  /* istanbul ignore next */
2091
2116
  parent.treeExpandTimer = window.setTimeout(function () { parent.notify(dragging, args); }, 800);
2117
+ scrollParent = parent.navigationpaneModule.treeObj.element.parentElement;
2118
+ scrollHandler(scrollParent, parent, 'e-level-2', args.event.screenY, args.event.y);
2092
2119
  }
2093
2120
  else if (parent.targetModule === 'detailsview') {
2094
2121
  node = closest(args.target, 'tr');
@@ -2099,6 +2126,8 @@ function draggingHandler(parent, args) {
2099
2126
  node.classList.add(DROP_FILE);
2100
2127
  }
2101
2128
  canDrop = true;
2129
+ scrollParent = parent.detailsviewModule.gridObj.element.querySelector('.e-content');
2130
+ scrollHandler(scrollParent, parent, 'e-row', args.event.screenY, args.event.y);
2102
2131
  }
2103
2132
  else if (parent.targetModule === 'largeiconsview') {
2104
2133
  node = closest(args.target, 'li');
@@ -2106,6 +2135,8 @@ function draggingHandler(parent, args) {
2106
2135
  node.classList.add(HOVER, DROP_FOLDER);
2107
2136
  }
2108
2137
  canDrop = true;
2138
+ scrollParent = parent.largeiconsviewModule.element.firstElementChild;
2139
+ scrollHandler(scrollParent, parent, 'e-large-icon', args.event.screenY, args.event.y);
2109
2140
  /* istanbul ignore next */
2110
2141
  }
2111
2142
  else if (parent.targetModule === 'breadcrumbbar') {
@@ -4188,7 +4219,7 @@ var LargeIconsView = /** @__PURE__ @class */ (function () {
4188
4219
  this.dragObj = new Draggable(this.listElements, {
4189
4220
  enableTailMode: true,
4190
4221
  distance: 5,
4191
- enableAutoScroll: true,
4222
+ enableAutoScroll: false,
4192
4223
  dragTarget: '.' + LARGE_ICON,
4193
4224
  helper: this.dragHelper.bind(this),
4194
4225
  cursorAt: this.parent.dragCursorPosition,
@@ -8984,7 +9015,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
8984
9015
  },
8985
9016
  dragStop: dragStopHandler.bind(this, this.parent),
8986
9017
  enableTailMode: true,
8987
- enableAutoScroll: true,
9018
+ enableAutoScroll: false,
8988
9019
  helper: this.dragHelper.bind(this)
8989
9020
  });
8990
9021
  }
@@ -9138,7 +9169,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
9138
9169
  this.parent.itemData = nodeData;
9139
9170
  var previousPath = this.parent.path;
9140
9171
  var sNode = select('[data-uid="' + this.treeObj.selectedNodes[0] + '"]', this.treeObj.element);
9141
- if (!this.isRightClick && this.isSameNodeClicked && sNode.querySelector('.e-list-text').innerHTML !== this.parent.pathNames[this.parent.pathNames.length - 1]) {
9172
+ if (!this.isRightClick && this.isSameNodeClicked) {
9142
9173
  updatePath(args.node, this.parent.itemData[0], this.parent);
9143
9174
  }
9144
9175
  else {
@@ -10803,7 +10834,7 @@ var DetailsView = /** @__PURE__ @class */ (function () {
10803
10834
  dragStartHandler(_this.parent, args, _this.dragObj);
10804
10835
  },
10805
10836
  dragStop: dragStopHandler.bind(this, this.parent),
10806
- enableAutoScroll: true,
10837
+ enableAutoScroll: false,
10807
10838
  helper: this.dragHelper.bind(this)
10808
10839
  });
10809
10840
  }