bm-core-ui 2.10.0 → 2.10.2

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.
@@ -5079,6 +5079,8 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
5079
5079
  if (BM_COLLECTION_VIEW_USE_STATIC_CONTEXT) BMAnimationContextBeginStatic();
5080
5080
 
5081
5081
  if (animated === undefined) animated = YES;
5082
+
5083
+ var self = this;
5082
5084
 
5083
5085
  let resolveUpdateData;
5084
5086
  this._dataUpdatePromise = new Promise(function (resolve, reject) {resolveUpdateData = resolve});
@@ -5427,8 +5429,6 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
5427
5429
 
5428
5430
  this.dataSet.useOldData(NO);
5429
5431
 
5430
- var self = this;
5431
-
5432
5432
  var contentSizeWidthApplied = NO;
5433
5433
  var contentSizeHeightApplied = NO;
5434
5434
 
@@ -5879,13 +5879,13 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
5879
5879
  }
5880
5880
 
5881
5881
  // Then the horizontal X offset
5882
- if (options.withVerticalGravity == BMCollectionViewScrollingGravityHorizontal.Left) {
5882
+ if (options.horizontalGravity == BMCollectionViewScrollingGravityHorizontal.Left) {
5883
5883
  offset.x = rect.origin.x;
5884
5884
  }
5885
- else if (options.withVerticalGravity == BMCollectionViewScrollingGravityHorizontal.Center) {
5885
+ else if (options.horizontalGravity == BMCollectionViewScrollingGravityHorizontal.Center) {
5886
5886
  offset.x = rect.origin.x + rect.size.width / 2 - this.frame.size.width / 2;
5887
5887
  }
5888
- else if (options.withVerticalGravity == BMCollectionViewScrollingGravityHorizontal.Right) {
5888
+ else if (options.horizontalGravity == BMCollectionViewScrollingGravityHorizontal.Right) {
5889
5889
  offset.x = rect.origin.x + rect.size.width - this.frame.size.width;
5890
5890
  }
5891
5891
 
@@ -1479,6 +1479,7 @@ BMMenu.prototype = {
1479
1479
  * }
1480
1480
  */
1481
1481
  _selectMenuItemWithEvent(event, {forKeyboardShortcut: shortcut}) {
1482
+ event.preventDefault();
1482
1483
  const item = shortcut._menuItem;
1483
1484
 
1484
1485
  // The item must not be a separator or disabled