mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 12:03:11 +00:00
Fix sidebar swipe flicker after letting go
This commit is contained in:
parent
073a38ef1e
commit
502780c5a3
1 changed files with 11 additions and 9 deletions
|
@ -90,7 +90,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import {defineComponent, onMounted, onUnmounted, PropType, ref} from "vue";
|
import {defineComponent, nextTick, onMounted, onUnmounted, PropType, ref} from "vue";
|
||||||
import {useRoute} from "vue-router";
|
import {useRoute} from "vue-router";
|
||||||
import {useStore} from "../js/store";
|
import {useStore} from "../js/store";
|
||||||
import NetworkList from "./NetworkList.vue";
|
import NetworkList from "./NetworkList.vue";
|
||||||
|
@ -199,6 +199,12 @@ export default defineComponent({
|
||||||
|
|
||||||
store.commit("sidebarDragging", false);
|
store.commit("sidebarDragging", false);
|
||||||
|
|
||||||
|
touchStartPos.value = null;
|
||||||
|
touchCurPos.value = null;
|
||||||
|
touchStartTime.value = 0;
|
||||||
|
menuIsMoving.value = false;
|
||||||
|
|
||||||
|
void nextTick(() => {
|
||||||
if (sidebar.value) {
|
if (sidebar.value) {
|
||||||
sidebar.value.style.transform = "";
|
sidebar.value.style.transform = "";
|
||||||
}
|
}
|
||||||
|
@ -206,11 +212,7 @@ export default defineComponent({
|
||||||
if (props.overlay) {
|
if (props.overlay) {
|
||||||
props.overlay.style.opacity = "";
|
props.overlay.style.opacity = "";
|
||||||
}
|
}
|
||||||
|
});
|
||||||
touchStartPos.value = null;
|
|
||||||
touchCurPos.value = null;
|
|
||||||
touchStartTime.value = 0;
|
|
||||||
menuIsMoving.value = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onTouchStart = (e: TouchEvent) => {
|
const onTouchStart = (e: TouchEvent) => {
|
||||||
|
|
Loading…
Reference in a new issue