@momo-kits/carousel 0.80.8-beta.6 → 0.80.8-beta.9

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.
Files changed (2) hide show
  1. package/index.tsx +4 -2
  2. package/package.json +1 -1
package/index.tsx CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  } from 'react-native';
12
12
  import {defaultAnimatedStyles, defaultScrollInterpolator} from './animation';
13
13
  import {CarouselProps, CarouselRef, CarouselState, Position} from './types';
14
- import {Spacing} from '@momo-kits/foundation';
14
+ import {scaleSize, Spacing} from '@momo-kits/foundation';
15
15
 
16
16
  const IS_ANDROID = Platform.OS === 'android';
17
17
  const IS_IOS = Platform.OS === 'ios';
@@ -574,7 +574,9 @@ export default class Carousel extends React.PureComponent<
574
574
  (this.props.visibleItem === 1
575
575
  ? screenWidth - Spacing.M * 2
576
576
  : Math.ceil(
577
- (containerWidth * 0.9 - visibleItem * Spacing.S) / visibleItem,
577
+ scaleSize(
578
+ (containerWidth * 0.9 - visibleItem * Spacing.S) / visibleItem,
579
+ ),
578
580
  ));
579
581
 
580
582
  this.setState({containerWidth, itemWidth});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/carousel",
3
- "version": "0.80.8-beta.6",
3
+ "version": "0.80.8-beta.9",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "peerDependencies": {