Giter Site home page Giter Site logo

Comments (6)

any86 avatar any86 commented on May 22, 2024

swipe是触点离开屏幕那一刻判断并触发的, 是个瞬时的状态, 所以就没有move end.

你说的官方是哪里啊?

from any-touch.

hugetiny avatar hugetiny commented on May 22, 2024

swipe是触点离开屏幕那一刻判断并触发的, 是个瞬时的状态, 所以就没有move end.

你说的官方是哪里啊?

你现在swipe是从touchend或者mouseup开始算的我知道
我的逻辑是:

长按都是panstart panmove panend
短按都是swipestart,swipemove,swipeend或者叫pressstart,pressmove,pressend
比较清晰一点
官方手势库vue-touch啊 vue放弃维护了

from any-touch.

any86 avatar any86 commented on May 22, 2024

swipe的逻辑是你按住后, 在短时间内滑动了一定的就距离就可以判断为swipe, 也可以理解为滑动速度到达一定值, 离开屏幕的时候才触发swipe, 所以在他之前你是拖拽了多久都不管的, 所以不是长按和短按的区别触发了swipe.

vue-touch应该包裹的hammer.js, hammer中的swipe这是这么判断的, 我还参考过swiper.js上对手势的定义, 他的swipe也是这个逻辑.

hammer.js早就不维护了, 所以vue-touch也就不可能在继续更新了.

from any-touch.

any86 avatar any86 commented on May 22, 2024

所以我觉得你的需求应该是配合pan+swipe使用

from any-touch.

hugetiny avatar hugetiny commented on May 22, 2024

少年,Vue的手势库靠你了

from any-touch.

any86 avatar any86 commented on May 22, 2024

━(`∀´)ノ亻!

from any-touch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.