Skip to content
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

Few improvements for the AdvancedDrawer and AdvancedDrawerController #45

Open
JohnF17 opened this issue Sep 13, 2023 · 0 comments
Open

Comments

@JohnF17
Copy link

JohnF17 commented Sep 13, 2023

Hello, here are a few improvements I've thought about for this great package.

Improvements

Add the following properties to the AdvancedDrawer

  • Allow customisation of the drag start position by adding an optional dragStartPositionOffset parameter
    • Fixes the issue of the drawer just randomly appearing on screen via a horizontal drag on any part of the screen, even the furthest drag opposite from the provided direction. With this parameter the horizontal drag only starts if the drag start offset (got from dragDetails) is less than or equal to the provided dragStartPositionOffset.
    • You can also make it an enum or a percentage out of 100 like 25%, 50%, 75%, 100% (which is the behaviour we have now) and 0% (which'll mean it's disabled)
      • Ex. If 25% is picked, this would mean 25% of the screen from the drag direction would be where the drag has to start to open up the drawer

Add the following methods to the AdvancedDrawerController:

  • isDrawerOpen method
    • No parameters
    • returns a boolean
  • setGestures method
    • enabled: parameter
    • returns void

Expose many more values to the controller.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant