Browse Source

allow to disable the side menu swipe gesture

talkol 8 years ago
parent
commit
a61d69d5fe
2 changed files with 6 additions and 2 deletions
  1. 4
    2
      README.md
  2. 2
    0
      src/platformSpecific.ios.js

+ 4
- 2
README.md View File

172
     },
172
     },
173
     right: { // optional, define if you want a drawer from the right
173
     right: { // optional, define if you want a drawer from the right
174
       screen: 'example.SecondSideMenu' // unique ID registered with Navigation.registerScreen
174
       screen: 'example.SecondSideMenu' // unique ID registered with Navigation.registerScreen
175
-    }
175
+    },
176
+    disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
176
   },
177
   },
177
   passProps: {}, // simple serializable object that will pass as props to all top screens (optional)
178
   passProps: {}, // simple serializable object that will pass as props to all top screens (optional)
178
   animationType: 'slide-down' // optional, add transition animation to root change: 'none', 'slide-down', 'fade'
179
   animationType: 'slide-down' // optional, add transition animation to root change: 'none', 'slide-down', 'fade'
197
     },
198
     },
198
     right: { // optional, define if you want a drawer from the right
199
     right: { // optional, define if you want a drawer from the right
199
       screen: 'example.SecondSideMenu' // unique ID registered with Navigation.registerScreen
200
       screen: 'example.SecondSideMenu' // unique ID registered with Navigation.registerScreen
200
-    }
201
+    },
202
+    disableOpenGesture: false // optional, can the drawer be opened with a swipe instead of button
201
   },
203
   },
202
   passProps: {}, // simple serializable object that will pass as props to all top screens (optional)
204
   passProps: {}, // simple serializable object that will pass as props to all top screens (optional)
203
   animationType: 'slide-down' // optional, add transition animation to root change: 'none', 'slide-down', 'fade'
205
   animationType: 'slide-down' // optional, add transition animation to root change: 'none', 'slide-down', 'fade'

+ 2
- 0
src/platformSpecific.ios.js View File

27
             passPropsLeft={{navigatorID: navigatorID}}
27
             passPropsLeft={{navigatorID: navigatorID}}
28
             componentRight={params.drawer.right ? params.drawer.right.screen : undefined}
28
             componentRight={params.drawer.right ? params.drawer.right.screen : undefined}
29
             passPropsRight={{navigatorID: navigatorID}}
29
             passPropsRight={{navigatorID: navigatorID}}
30
+            disableOpenGesture={params.drawer.disableOpenGesture}
30
           >
31
           >
31
             {this.renderBody()}
32
             {this.renderBody()}
32
           </DrawerControllerIOS>
33
           </DrawerControllerIOS>
97
             passPropsLeft={{navigatorID: navigatorID}}
98
             passPropsLeft={{navigatorID: navigatorID}}
98
             componentRight={params.drawer.right ? params.drawer.right.screen : undefined}
99
             componentRight={params.drawer.right ? params.drawer.right.screen : undefined}
99
             passPropsRight={{navigatorID: navigatorID}}
100
             passPropsRight={{navigatorID: navigatorID}}
101
+            disableOpenGesture={params.drawer.disableOpenGesture}
100
           >
102
           >
101
             {this.renderBody()}
103
             {this.renderBody()}
102
           </DrawerControllerIOS>
104
           </DrawerControllerIOS>