forked from AkkomaGang/akkoma-fe
Add closed-check for touchmove
This commit is contained in:
parent
e46b560ead
commit
4752081818
2 changed files with 6 additions and 2 deletions
|
@ -33,7 +33,7 @@ const SideDrawer = {
|
|||
},
|
||||
touchMove (e) {
|
||||
const delta = deltaX(this.touchX, touchEventX(e))
|
||||
if (delta < -30) {
|
||||
if (delta < -30 && !this.closed) {
|
||||
this.toggleDrawer()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
<template>
|
||||
<div class="side-drawer-container" :class="{ 'side-drawer-container-closed': closed, 'side-drawer-container-open': !closed }">
|
||||
<div class="panel panel-default side-drawer" :class="{'side-drawer-closed': closed}" @touchstart="touchStart" @touchmove.prevent="touchMove">
|
||||
<div class="panel panel-default side-drawer"
|
||||
:class="{'side-drawer-closed': closed}"
|
||||
@touchstart="touchStart"
|
||||
@touchmove.prevent="touchMove"
|
||||
>
|
||||
<div class="side-drawer-heading">
|
||||
<user-card-content :activatePanel="activatePanel" :user="currentUser" :switcher="false" :hideBio="true">
|
||||
</user-card-content>
|
||||
|
|
Loading…
Reference in a new issue