bm-core-ui 2.11.3 → 2.11.4

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.
@@ -305,7 +305,7 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
305
305
 
306
306
  this._usesLegacyDataSet = NO;
307
307
  this._dataSource = source;
308
- this._dataSet = BMCollectionViewDataSetAdapter.adapterWithDataSource(source);
308
+ this._dataSet = BMCollectionViewDataSetAdapter.adapterWithDataSource(this, source);
309
309
 
310
310
  this.dataSetDidChangeFromDataSet(oldDataSet);
311
311
  },
@@ -889,10 +889,15 @@ BMMenu.prototype = {
889
889
  }
890
890
 
891
891
  // Make the menu expand
892
+ menuNode.style.overflow = 'hidden';
892
893
  __BMVelocityAnimate(menuNode, {scaleX: 1, scaleY: 1, opacity: 1, translateZ: 0, translateY: 0, translateX: 0}, {
893
894
  duration,
894
895
  easing,
895
- complete: _ => ((menuNode.style.pointerEvents = 'all'), menuContainer.style.pointerEvents = 'all')
896
+ complete: _ => {
897
+ menuNode.style.pointerEvents = 'all';
898
+ menuContainer.style.pointerEvents = 'all';
899
+ menuNode.style.overflow = '';
900
+ }
896
901
  }, BMMENU_USE_WEB_ANIMATIONS);
897
902
 
898
903
  // Animate each child node in
@@ -1008,7 +1013,7 @@ BMMenu.prototype = {
1008
1013
  if (point.x > windowWidth / 2) {
1009
1014
  transformOriginX = '100%';
1010
1015
 
1011
- menuNode.style.maxWidth = point.x + 'px';
1016
+ menuNode.style.maxWidth = rect.origin.x + 'px';
1012
1017
  point.x = rect.origin.x - width;
1013
1018
  }
1014
1019
  else {
@@ -1020,7 +1025,7 @@ BMMenu.prototype = {
1020
1025
  if (point.y > windowHeight / 2) {
1021
1026
  transformOriginY = ' 100%';
1022
1027
 
1023
- menuNode.style.maxHeight = point.y + 'px';
1028
+ menuNode.style.maxHeight = rect.bottom + 'px';
1024
1029
  point.y = Math.max(rect.bottom + paddingBottom - height, 0);
1025
1030
  }
1026
1031
  else {
@@ -1035,10 +1040,15 @@ BMMenu.prototype = {
1035
1040
  menuNode.style.top = point.y + 'px';
1036
1041
 
1037
1042
  // Animate the menu in
1043
+ menuNode.style.overflow = 'hidden';
1038
1044
  (window.Velocity || $.Velocity).animate(menuNode, {scaleX: 1, scaleY: 1, opacity: 1, translateZ: 0}, {
1039
1045
  duration: 200,
1040
1046
  easing: 'easeOutQuad',
1041
- complete: _ => ((menuNode.style.pointerEvents = 'all'), menuContainer.style.pointerEvents = 'all')
1047
+ complete: _ => {
1048
+ menuNode.style.pointerEvents = 'all';
1049
+ menuContainer.style.pointerEvents = 'all';
1050
+ menuNode.style.overflow = '';
1051
+ }
1042
1052
  });
1043
1053
 
1044
1054
  // Animate each menu item in
@@ -1367,6 +1377,8 @@ BMMenu.prototype = {
1367
1377
 
1368
1378
  this._isSupermenuClosing = NO;
1369
1379
 
1380
+ this._node.style.pointerEvents = 'none';
1381
+
1370
1382
  __BMVelocityAnimate(this._node, {
1371
1383
  scaleX: this._kind == BMMenuKind.PullDownMenu ? 1 : scale,
1372
1384
  scaleY: scale,