diff --git a/packages/react-navigation/examples/NavigationPlayground/js/App.js b/packages/react-navigation/examples/NavigationPlayground/js/App.js index 1efa26ae..d4b05ff8 100644 --- a/packages/react-navigation/examples/NavigationPlayground/js/App.js +++ b/packages/react-navigation/examples/NavigationPlayground/js/App.js @@ -1,6 +1,9 @@ /* @flow */ import React from 'react'; +import { ScreenOrientation } from 'expo'; + +ScreenOrientation.allow(ScreenOrientation.Orientation.ALL); import { Platform, diff --git a/packages/react-navigation/src/navigators/DrawerNavigator.js b/packages/react-navigation/src/navigators/DrawerNavigator.js index f6f9e1f9..012c5ece 100644 --- a/packages/react-navigation/src/navigators/DrawerNavigator.js +++ b/packages/react-navigation/src/navigators/DrawerNavigator.js @@ -23,13 +23,14 @@ export type DrawerNavigatorConfig = { } & NavigationTabRouterConfig & DrawerViewConfig; +const { height, width } = Dimensions.get('window'); + const DefaultDrawerConfig = { /* * Default drawer width is screen width - header width * https://material.io/guidelines/patterns/navigation-drawer.html */ - drawerWidth: - Dimensions.get('window').width - (Platform.OS === 'android' ? 56 : 64), + drawerWidth: Math.min(height, width) - (Platform.OS === 'android' ? 56 : 64), contentComponent: DrawerItems, drawerPosition: 'left', drawerBackgroundColor: 'white',