react-native-navigation-drawer-extension
react-native-navigation-drawer-extension copied to clipboard
Using 'drawerScreenWidth' prop on landscape orientation
I was wondering if there was a reason for setting the drawer width to a constant when the orientation is landscape and ignoring the drawerScreenWidth prop?
this.drawerWidth = this.isLandscape()
? MaxWidthOnLandscapeMode // <-- This constant
: _resolveDrawerSize(props.drawerScreenWidth, this.screenWidth);
Hmm, I'm not familiar with the reasoning behind this, maybe @rodriigovieira can answer that?
Hello! I would like to add that drawerScreenHeight doesn't react on any value also.
@Danite I'll investigate it next week, to see if there's something to be improved there.
Hello! I would like to add that
drawerScreenHeightdoesn't react on any value also.
Did that present any issues?
@Danite I don't think the same width should be applied to the drawer when it is in both directions. For example, you might specify a width to use on landscape mode that's too big to be used on portrait mode, or a small width in portrait mode that would look weirdly small on landscape mode.
Ideally, I believe we should have two properties, one to define the width in landscape mode, and another to define it in portrait mode (this one we already have).
Sadly, I don't have time at this moment to work on this feature, but we're always welcome to PRs!
@Danite if you make a PR for this, I'll be happy to review
@rodriigovieira That's a good point, I also think that it would be better to have 2 properties for this kind of configuration, do you think that it should be defined also for the height? Thanks for the answer!
@lukebrandonfarrell I'll take a look!