New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add bottom clamp option #108
Conversation
Looks cool, but please note that values inside nodes are not |
Well, thank you! I will look at it ASAP |
Wow that's exactly what I need, how handy! 😊 |
@osdnk I've made proposed changes. Does it look better now? |
src/index.tsx
Outdated
@@ -358,6 +366,11 @@ export default class BottomSheetBehavior extends React.Component<Props, State> { | |||
// current snap point desired | |||
this.snapPoint = currentSnapPoint() | |||
|
|||
if (props.enabledBottomClamp) { | |||
this.clampingEnabled.setValue(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can move it directly to declaration :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@osdnk I'm not totally sure if you meant animation declaration or class declaration but hopefully I got you right :)
I desperately need this, may I help with anything? |
If you need this immediately you can still use my fork :)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Please, next time don't use -n
!
If
enabledBottomClamp
is set to true, user is not able to overdrag panel above its minimal snappoint value, so panel behaves like the one from original Apple Maps app.How it looks like?