bm-core-ui 2.9.0 → 2.9.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.
|
@@ -5532,7 +5532,7 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
|
|
|
5532
5532
|
if (self._droppedShadows) {
|
|
5533
5533
|
self._droppedShadows.forEach(shadow => {
|
|
5534
5534
|
if (shadow.transform) {
|
|
5535
|
-
BMHook(shadow.node, {rotateZ: shadow.rotation});
|
|
5535
|
+
BMHook(shadow.node, {rotateZ: shadow.rotation + 'deg', translateX: '0px', translateY: '0px'});
|
|
5536
5536
|
let controller = BMAnimationContextGetCurrent().controllerForObject(shadow, {node: shadow.node});
|
|
5537
5537
|
controller.registerBuiltInProperty('translateX', {withValue: shadow.transform.origin.x + 'px'});
|
|
5538
5538
|
controller.registerBuiltInProperty('translateY', {withValue: shadow.transform.origin.y + 'px'});
|
|
@@ -5542,7 +5542,7 @@ BMCollectionView.prototype = BMExtend(BM_COLLECTION_VIEW_USE_BMVIEW_SUBCLASS ? O
|
|
|
5542
5542
|
controller.registerBuiltInProperty('opacity', {withValue: 0});
|
|
5543
5543
|
}
|
|
5544
5544
|
else {
|
|
5545
|
-
BMHook(shadow.node, {rotateZ: shadow.rotation});
|
|
5545
|
+
BMHook(shadow.node, {rotateZ: shadow.rotation + 'deg'});
|
|
5546
5546
|
let controller = BMAnimationContextGetCurrent().controllerForObject(shadow, {node: shadow.node});
|
|
5547
5547
|
controller.registerBuiltInProperty('scaleX', {withValue: .33});
|
|
5548
5548
|
controller.registerBuiltInProperty('scaleY', {withValue: .33});
|
|
@@ -1679,12 +1679,39 @@ BMCollectionViewFlowLayout.prototype = BMExtend(Object.create(BMCollectionViewLa
|
|
|
1679
1679
|
return;
|
|
1680
1680
|
}
|
|
1681
1681
|
|
|
1682
|
+
// When the scrollbar offset is used, invalidate any measurement that exceeds the available space.
|
|
1683
|
+
if (this._expectedCellSize && this._collectionView.scrollBarSize) {
|
|
1684
|
+
switch (this.orientation) {
|
|
1685
|
+
case BMCollectionViewFlowLayoutOrientation.Horizontal:
|
|
1686
|
+
// Determine the available height.
|
|
1687
|
+
const insetHeight = this._sectionInsets.top + this._sectionInsets.bottom;
|
|
1688
|
+
const paddingHeight = this._topPadding + this._bottomPadding;
|
|
1689
|
+
const height = this._collectionView.frame.size.height - insetHeight - paddingHeight - this._collectionView.scrollBarSize;
|
|
1690
|
+
|
|
1691
|
+
// In horizontal mode, invalidate the measurements for cells that are too tall.
|
|
1692
|
+
this._collectionView.invalidateMeasuredSizeOfCellsWithBlock((size) => {
|
|
1693
|
+
return size.height > height;
|
|
1694
|
+
});
|
|
1695
|
+
break;
|
|
1696
|
+
default:
|
|
1697
|
+
// Determine the available width.
|
|
1698
|
+
const insetWidth = this._sectionInsets.left + this._sectionInsets.right;
|
|
1699
|
+
const width = this._collectionView.frame.size.width - insetWidth - this.collectionView.scrollBarSize;
|
|
1700
|
+
|
|
1701
|
+
// In default (vertical) mode, invalidate the measurements for cells that are too wide.
|
|
1702
|
+
this._collectionView.invalidateMeasuredSizeOfCellsWithBlock((size) => {
|
|
1703
|
+
return size.width > width;
|
|
1704
|
+
});
|
|
1705
|
+
break;
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1682
1709
|
let iterator = this._prepareLayoutWithScrollbarOffsetGenerator(useOffset);
|
|
1683
1710
|
|
|
1684
1711
|
// When not using automatic cell sizes, the generator function will run to finish from the first
|
|
1685
|
-
// invocation of next
|
|
1712
|
+
// invocation of `next`.
|
|
1686
1713
|
// When using automatic cell sizes, the first iteration will only build a rough outline of the expected layout
|
|
1687
|
-
// and must be retained so different portions of the layout can subsequently be computed
|
|
1714
|
+
// and must be retained so different portions of the layout can subsequently be computed.
|
|
1688
1715
|
let result = iterator.next();
|
|
1689
1716
|
if (!result.done) {
|
|
1690
1717
|
this._layoutIterator = iterator;
|
|
@@ -447,7 +447,12 @@ IScroll.prototype = {
|
|
|
447
447
|
return;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
if (
|
|
450
|
+
if (
|
|
451
|
+
this.options.preventDefault &&
|
|
452
|
+
!utils.isBadAndroid &&
|
|
453
|
+
!utils.preventDefaultException(e.target, this.options.preventDefaultException) &&
|
|
454
|
+
!e.target.classList.contains('BMCollectionViewCellEventHandler') && !e.target.parentNode.classList.contains('BMCollectionViewCellEventHandler')
|
|
455
|
+
) {
|
|
451
456
|
e.preventDefault();
|
|
452
457
|
}
|
|
453
458
|
|
|
@@ -597,7 +602,10 @@ IScroll.prototype = {
|
|
|
597
602
|
return;
|
|
598
603
|
}
|
|
599
604
|
|
|
600
|
-
if (
|
|
605
|
+
if (
|
|
606
|
+
this.options.preventDefault && !utils.preventDefaultException(e.target, this.options.preventDefaultException) &&
|
|
607
|
+
!e.target.classList.contains('BMCollectionViewCellEventHandler') && !e.target.parentNode.classList.contains('BMCollectionViewCellEventHandler')
|
|
608
|
+
) {
|
|
601
609
|
e.preventDefault();
|
|
602
610
|
}
|
|
603
611
|
|