@syncfusion/ej2-navigations 29.1.37 → 29.1.38

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.
@@ -3009,6 +3009,7 @@ let MenuBase = class MenuBase extends Component {
3009
3009
  let pElement;
3010
3010
  const animateElement = (this.enableScrolling && !this.isMenu && closest(ul, '.e-menu-vscroll'))
3011
3011
  ? closest(ul, '.e-menu-vscroll') : ul;
3012
+ Animation.stop(animateElement);
3012
3013
  if (this.animationSettings.effect === 'None' || !isMenuOpen) {
3013
3014
  if (this.hamburgerMode && ul) {
3014
3015
  ul.style.top = '0px';
@@ -3017,6 +3018,7 @@ let MenuBase = class MenuBase extends Component {
3017
3018
  this.end(ul, isMenuOpen);
3018
3019
  }
3019
3020
  else {
3021
+ animateElement.style.maxHeight = '';
3020
3022
  this.animation.animate(animateElement, {
3021
3023
  name: this.animationSettings.effect,
3022
3024
  duration: this.animationSettings.duration,
@@ -3035,7 +3037,7 @@ let MenuBase = class MenuBase extends Component {
3035
3037
  }
3036
3038
  else {
3037
3039
  options.element.style.display = 'block';
3038
- options.element.style.maxHeight = this.isMenu ? options.element.getBoundingClientRect().height + 'px' : options.element.scrollHeight + 'px';
3040
+ options.element.style.maxHeight = options.element.getBoundingClientRect().height + 'px';
3039
3041
  }
3040
3042
  },
3041
3043
  progress: (options) => {
@@ -12280,7 +12282,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12280
12282
  return undefined;
12281
12283
  }
12282
12284
  getChildGroup(data, parentId, isRoot) {
12283
- let childNodes;
12285
+ const childNodes = [];
12284
12286
  if (isNullOrUndefined(data)) {
12285
12287
  return childNodes;
12286
12288
  }
@@ -12294,9 +12296,6 @@ let TreeView = TreeView_1 = class TreeView extends Component {
12294
12296
  else if (isRoot) {
12295
12297
  return data[parseInt(i.toString(), 10)];
12296
12298
  }
12297
- else {
12298
- return [];
12299
- }
12300
12299
  }
12301
12300
  return childNodes;
12302
12301
  }
@@ -14206,17 +14205,15 @@ let TreeView = TreeView_1 = class TreeView extends Component {
14206
14205
  removeChildNodes(parentId) {
14207
14206
  const cNodes = this.getChildGroup(this.groupedData, parentId, false);
14208
14207
  const childData = [];
14209
- if (cNodes) {
14210
- for (let i = 0, len = cNodes.length; i < len; i++) {
14211
- const dm = new DataManager(this.treeData);
14212
- const id = getValue(this.fields.id, cNodes[parseInt(i.toString(), 10)]).toString();
14213
- const data = {};
14214
- const currId = this.isNumberTypeId ? parseFloat(id) : id;
14215
- data[this.fields.id] = currId;
14216
- const nodeData = dm.remove(this.fields.id, data);
14217
- childData.push(nodeData[0]);
14218
- this.removeChildNodes(id);
14219
- }
14208
+ for (let i = 0, len = cNodes.length; i < len; i++) {
14209
+ const dm = new DataManager(this.treeData);
14210
+ const id = getValue(this.fields.id, cNodes[parseInt(i.toString(), 10)]).toString();
14211
+ const data = {};
14212
+ const currId = this.isNumberTypeId ? parseFloat(id) : id;
14213
+ data[this.fields.id] = currId;
14214
+ const nodeData = dm.remove(this.fields.id, data);
14215
+ childData.push(nodeData[0]);
14216
+ this.removeChildNodes(id);
14220
14217
  }
14221
14218
  return childData;
14222
14219
  }
@@ -18257,6 +18254,14 @@ let Carousel = class Carousel extends Component {
18257
18254
  if (this.element.classList.contains(CLS_HOVER) || isNullOrUndefined(this.slideItems) || this.slideItems.length <= 1) {
18258
18255
  return;
18259
18256
  }
18257
+ if (this.swipeMode === (~CarouselSwipeMode.Touch & ~CarouselSwipeMode.Mouse)) {
18258
+ return;
18259
+ }
18260
+ const eventType = e.startEvents ? e.startEvents.toString() : null;
18261
+ if (eventType && ((this.swipeMode === CarouselSwipeMode.Mouse && eventType.includes('Touch')) ||
18262
+ (this.swipeMode === CarouselSwipeMode.Touch && eventType.includes('Mouse')))) {
18263
+ return;
18264
+ }
18260
18265
  const direction = (e.swipeDirection === 'Right') ? 'Previous' : 'Next';
18261
18266
  const slideIndex = this.getSlideIndex(direction);
18262
18267
  if (!this.isSuspendSlideTransition(slideIndex, direction)) {