You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.
Loving how awesome this plugin so +1 for awesomeness!
I was utilizing a couple of swipes one in a parent and one in a child but I want to prevent propagation of swiping. I don't know the best way to implement this and maybe it's worth adding into the docs in some way. This is how I was able to prevent propagation to child elements and components.
<v-touchv-on:swipe="swipe"><div>Swipe with me</div><divref="preventSwipe">Don't swipe with me!!!</div><div>Swipe with me</div></v-touch>
Then in my methods I check whether the to prevent the swipe.
methods: {swipe: function(e){letthat=this;// Prevent propagation for swipes inside the content boxvarallowSwipe=true;_.forEach(e.srcEvent.path,function(item,index){if(item==that.$refs.preventSwipe){allowSwipe=false;}});// Only continue if prevent swipe is falseif(allowSwipe){// Identify directionif(e.offsetDirection==4){bus.$emit('shift-item','previous');}if(e.offsetDirection==2){bus.$emit('shift-item','next');}}},}
This works but I imagine there is a much smoother way to do it which might be worth putting in the docs.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Loving how awesome this plugin so +1 for awesomeness!
I was utilizing a couple of swipes one in a parent and one in a child but I want to prevent propagation of swiping. I don't know the best way to implement this and maybe it's worth adding into the docs in some way. This is how I was able to prevent propagation to child elements and components.
Then in my methods I check whether the to prevent the swipe.
This works but I imagine there is a much smoother way to do it which might be worth putting in the docs.
The text was updated successfully, but these errors were encountered: