Turn off dragscroll on touch devices as its not needed there

This commit is contained in:
Kacper Donat 2020-01-25 17:32:23 +01:00
parent b23bf3ad84
commit 89b4f5911a
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
<div class="trip">
<ol class="trip__stops" v-dragscroll.x ref="stops">
<ol class="trip__stops" v-dragscroll.x="!$isTouch" ref="stops">
<li v-for="stop in stops" class="trip__stop" :class="[ stop.current && 'trip__stop--current', stop.visited && 'trip__stop--visited' ]">
<div class="trip__marker"/>
<div class="trip__description">

View File

@ -21,6 +21,8 @@ Vue.use(Vuex);
Vue.use(PortalVue);
Vue.use(VueDragscroll);
Vue.prototype.$isTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints > 0;
// async dependencies
(async function () {
const [ components, { default: store } ] = await Promise.all([