about summary refs log tree commit diff
path: root/src/view/com/util/gestures/SwipeAndZoom.tsx
diff options
context:
space:
mode:
authorAryan Goharzad <arrygoo@gmail.com>2023-01-20 14:43:28 -0500
committerGitHub <noreply@github.com>2023-01-20 13:43:28 -0600
commit06e41167d05a26befb14b9742f4fc4ef3833d35d (patch)
tree53b1dea4922903ca91775980b6cfb1f0adea05e3 /src/view/com/util/gestures/SwipeAndZoom.tsx
parent2fce1637b4ae01667da8ceafaa07a6266ab88450 (diff)
downloadvoidsky-06e41167d05a26befb14b9742f4fc4ef3833d35d.tar.zst
Lints some errors and warnings (#76)
Diffstat (limited to 'src/view/com/util/gestures/SwipeAndZoom.tsx')
-rw-r--r--src/view/com/util/gestures/SwipeAndZoom.tsx20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/view/com/util/gestures/SwipeAndZoom.tsx b/src/view/com/util/gestures/SwipeAndZoom.tsx
index dc3a9f54c..881eea094 100644
--- a/src/view/com/util/gestures/SwipeAndZoom.tsx
+++ b/src/view/com/util/gestures/SwipeAndZoom.tsx
@@ -88,11 +88,21 @@ export function SwipeAndZoom({
   }
 
   const canDir = (d: Dir) => {
-    if (d === Dir.Left) return canSwipeLeft
-    if (d === Dir.Right) return canSwipeRight
-    if (d === Dir.Up) return canSwipeUp
-    if (d === Dir.Down) return canSwipeDown
-    if (d === Dir.Zoom) return zoomEnabled
+    if (d === Dir.Left) {
+      return canSwipeLeft
+    }
+    if (d === Dir.Right) {
+      return canSwipeRight
+    }
+    if (d === Dir.Up) {
+      return canSwipeUp
+    }
+    if (d === Dir.Down) {
+      return canSwipeDown
+    }
+    if (d === Dir.Zoom) {
+      return zoomEnabled
+    }
     return false
   }
   const isHorz = (d: Dir) => d === Dir.Left || d === Dir.Right