From 0eff4bd0acf709901b29877f7fc65f7a6241e058 Mon Sep 17 00:00:00 2001 From: shpuld Date: Wed, 27 Mar 2019 22:44:25 +0200 Subject: [PATCH] make side drawer use gesture service and fix its animations --- src/components/side_drawer/side_drawer.js | 5 +---- src/components/side_drawer/side_drawer.vue | 24 +++++++++++++++++++--- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/components/side_drawer/side_drawer.js b/src/components/side_drawer/side_drawer.js index 76c64fe0..567d2e5e 100644 --- a/src/components/side_drawer/side_drawer.js +++ b/src/components/side_drawer/side_drawer.js @@ -9,9 +9,7 @@ const SideDrawer = { closeGesture: undefined }), created () { - const cb = () => this.toggleDrawer() - this.closeGesture = GestureService.swipeGesture(GestureService.DIRECTION_LEFT, cb) - console.log(this.closeGesture) + this.closeGesture = GestureService.swipeGesture(GestureService.DIRECTION_LEFT, this.toggleDrawer) }, components: { UserCard }, computed: { @@ -47,7 +45,6 @@ const SideDrawer = { this.toggleDrawer() }, touchStart (e) { - console.log(this) GestureService.beginSwipe(e, this.closeGesture) }, touchMove (e) { diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue index 95ee21b4..e5046496 100644 --- a/src/components/side_drawer/side_drawer.vue +++ b/src/components/side_drawer/side_drawer.vue @@ -2,6 +2,7 @@
+