Explorar el Código

increased the swipe sensitivity

Warafear hace 11 meses
padre
commit
f19f12dfcc

+ 2 - 2
src/app/character/character-picker/character-card/character-card.component.ts

@@ -55,9 +55,9 @@ export class CharacterCardComponent {
 
   onTouchEnd(event: any) {
     const touchEndX = event.changedTouches[0].clientX;
-    if (touchEndX > this.touchStartX + 100) {
+    if (touchEndX > this.touchStartX + 50) {
       document.getElementById('delete-button')?.classList.add('show');
-    } else if (touchEndX < this.touchStartX - 100) {
+    } else if (touchEndX < this.touchStartX - 50) {
       document.getElementById('delete-button')?.classList.remove('show');
     }
   }

+ 2 - 2
src/app/journal/journal-home/journal-home.component.ts

@@ -51,9 +51,9 @@ export class JournalHomeComponent {
 
   onTouchEnd(event: any) {
     const touchEndX = event.changedTouches[0].clientX;
-    if (touchEndX > this.touchStartX + 100) {
+    if (touchEndX > this.touchStartX + 50) {
       this.navigation.openNavigation();
-    } else if (touchEndX < this.touchStartX - 100) {
+    } else if (touchEndX < this.touchStartX - 50) {
       this.navigation.closeNavigation();
     }
   }