( direction: SwipeDirection, slideVertically: boolean )
| 166 | * Returns true if the swipe should be ignored. |
| 167 | */ |
| 168 | export function shouldIgnoreSwipeDirection( |
| 169 | direction: SwipeDirection, |
| 170 | slideVertically: boolean |
| 171 | ): boolean { |
| 172 | const isSwipeLeftOrRight = direction === "Left" || direction === "Right"; |
| 173 | const isSwipeTopOrDown = direction === "Up" || direction === "Down"; |
| 174 | |
| 175 | if (isSwipeLeftOrRight && slideVertically) return true; |
| 176 | if (isSwipeTopOrDown && !slideVertically) return true; |
| 177 | return false; |
| 178 | } |
no outgoing calls
no test coverage detected