make side drawer use gesture service and fix its animations

This commit is contained in:
shpuld 2019-03-27 22:44:25 +02:00
parent c50e64f8ee
commit 0eff4bd0ac
2 changed files with 22 additions and 7 deletions

View file

@ -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) {