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

Added support for drawers opening from the top or bottom of the screen. #237

Merged
merged 1 commit into from
May 15, 2017

Conversation

ericpalakovichcarr
Copy link
Contributor

@ericpalakovichcarr ericpalakovichcarr commented Nov 21, 2016

This primarily adds support for specifying top or bottom in addition to the existing left and right options for the side prop. Here's a rundown of what's changed:

  • In the library itself:
    • Variables like left have become a more generic version, like length
    • Added the isLeftOrRightSide() function, returning true if the drawer opens to the left or right side of the screen. Otherwise it opens top or bottom. It's used for things like determining which way the drawer should animate open, or whether to use gestureState.dx or gestureState.dy for example.
    • Added the getDeviceLength() function to be used in place of this.state.viewport.width (since top or bottom would need to use this.state.viewport.height instead)
    • Added the getGestureDelta(gestureState) function to be used in place of gestureState.dx (since top or bottom would need to use gestureState.dy)
  • Updated README with the new top and bottom options for side
  • Removed the .idea folder from the repository (let me know if this is a bridge too far)
  • Updated the RNDrawerDemo project for the new top and bottom options.

Let me know if this needs anything else before it can be merged.

@dotansimha
Copy link

👍
any news on merging this PR?

@dotansimha
Copy link

dotansimha commented Feb 16, 2017

@BigSassy, just tested this PR in my project - it works great!! thanks!!

@ericpalakovichcarr
Copy link
Contributor Author

@dotansimha You are very welcome 👍

@timkendall
Copy link

This is spicy. Thanks for implementing - exactly what I need!

@michaelkirschbaum
Copy link

Tested this. Looks good 👍

@rt2zz
Copy link
Member

rt2zz commented May 15, 2017

this is fantastic, sorry for taking so long 👍 in we go :)

@rt2zz rt2zz merged commit 1b7852e into root-two:master May 15, 2017
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

Successfully merging this pull request may close these issues.

5 participants