@@ -71,7 +71,6 @@ declare interface RNNDrawerOptions {
7171 drawerScreenHeight ?: number ;
7272}
7373
74-
7574enum DirectionType {
7675 left = 'left' ,
7776 right = 'right' ,
@@ -131,11 +130,11 @@ interface SwipeMoveInterface {
131130
132131class RNNDrawer {
133132 /**
134- * Generates the drawer component to
135- * be used with react-native-navigation
136- *
137- * @param component
138- */
133+ * Generates the drawer component to
134+ * be used with react-native-navigation
135+ *
136+ * @param component
137+ */
139138 static create ( Component : React . ComponentType ) : any {
140139 class WrappedDrawer extends React . Component < IProps , IState > {
141140 private readonly screenWidth : number ;
@@ -255,10 +254,7 @@ class RNNDrawer {
255254 /** Component Variables */
256255 this . drawerWidth = this . isLandscape ( )
257256 ? MaxWidthOnLandscapeMode
258- : _resolveDrawerSize (
259- props . drawerScreenWidth ,
260- this . screenWidth ,
261- ) ;
257+ : _resolveDrawerSize ( props . drawerScreenWidth , this . screenWidth ) ;
262258 this . drawerHeight = _resolveDrawerSize (
263259 props . drawerScreenHeight ,
264260 this . screenHeight ,
@@ -368,19 +364,19 @@ class RNNDrawer {
368364 const { direction, fadeOpacity } = this . props ;
369365
370366 // Adapt the drawer's size on orientation change
371- Dimensions . addEventListener ( " change" , ( { window } ) => {
367+ Dimensions . addEventListener ( ' change' , ( { window } ) => {
372368 const screenHeight = window . height ;
373369
374370 this . setState ( { screenHeight } ) ;
375371
376372 // Apply correct position if opened from right
377- if ( this . props . direction === " right" ) {
373+ if ( this . props . direction === ' right' ) {
378374 // Calculates the position of the drawer from the left side of the screen
379375 const alignedMovementValue = window . width - this . drawerWidth ;
380376
381377 this . state . sideMenuOpenValue . setValue ( alignedMovementValue ) ;
382378 }
383- } )
379+ } ) ;
384380
385381 // Executes when the side of the screen interaction starts
386382 this . unsubscribeSwipeStart = listen ( 'SWIPE_START' , ( ) => {
@@ -476,7 +472,7 @@ class RNNDrawer {
476472 * Removes all the listenrs from this component
477473 */
478474 removeListeners ( ) {
479- Dimensions . removeEventListener ( " change" , ( ) => { } ) ;
475+ Dimensions . removeEventListener ( ' change' , ( ) => { } ) ;
480476 if ( this . unsubscribeSwipeStart ) this . unsubscribeSwipeStart ( ) ;
481477 if ( this . unsubscribeSwipeMove ) this . unsubscribeSwipeMove ( ) ;
482478 if ( this . unsubscribeSwipeEnd ) this . unsubscribeSwipeEnd ( ) ;
0 commit comments