Skip to content

Commit

Permalink
Exposed dragToss parameter as part of props. User can now specify the…
Browse files Browse the repository at this point in the history
…ir own override for dragToss constant value.
  • Loading branch information
bcpugh committed Jan 26, 2020
1 parent 775f5a5 commit e3e8b55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@ export class Modalize<FlatListItem = any, SectionListItem = any> extends React.C
adjustToContentHeight,
alwaysOpen,
closeAnimationConfig,
dragToss = 0.05,
} = this.props;
const { timing } = closeAnimationConfig!;
const { lastSnap, modalHeight, overlay } = this.state;
Expand All @@ -396,7 +397,6 @@ export class Modalize<FlatListItem = any, SectionListItem = any> extends React.C
let destSnapPoint = 0;

if (snapPoint || alwaysOpen) {
const dragToss = 0.05;
const endOffsetY = lastSnap + toValue + dragToss * velocityY;

this.snaps.forEach((snap: number) => {
Expand Down

0 comments on commit e3e8b55

Please sign in to comment.