B
B
Bohdan Zhorov2019-07-17 11:38:22
css
Bohdan Zhorov, 2019-07-17 11:38:22

How to properly implement swipe on Vue?

Good afternoon! I'm trying to implement a swipe on a view using vue-touch-events, but I don't know how to arrange it all beautifully. The concept is like in tinder, you can swipe the block to the left or right, but I don’t know how to arrange it beautifully, while the block only moves horizontally without animation, etc. And how to make it disappear at a certain moment, but so that it was all in harmony.

swipe(direction) {
      direction.target.style.position = 'absolute'
      direction.target.style.left = direction.changedTouches[0].clientX + 'px'
    }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question