Comments (6)
swipe是触点离开屏幕那一刻判断并触发的, 是个瞬时的状态, 所以就没有move end.
你说的官方是哪里啊?
from any-touch.
swipe是触点离开屏幕那一刻判断并触发的, 是个瞬时的状态, 所以就没有move end.
你说的官方是哪里啊?
你现在swipe是从touchend或者mouseup开始算的我知道
我的逻辑是:
长按都是panstart panmove panend
短按都是swipestart,swipemove,swipeend或者叫pressstart,pressmove,pressend
比较清晰一点
官方手势库vue-touch啊 vue放弃维护了
from any-touch.
swipe的逻辑是你按住后, 在短时间内滑动了一定的就距离就可以判断为swipe, 也可以理解为滑动速度到达一定值, 离开屏幕的时候才触发swipe, 所以在他之前你是拖拽了多久都不管的, 所以不是长按和短按的区别触发了swipe.
vue-touch应该包裹的hammer.js, hammer中的swipe这是这么判断的, 我还参考过swiper.js上对手势的定义, 他的swipe也是这个逻辑.
hammer.js早就不维护了, 所以vue-touch也就不可能在继续更新了.
from any-touch.
所以我觉得你的需求应该是配合pan+swipe使用
from any-touch.
少年,Vue的手势库靠你了
from any-touch.
━(`∀´)ノ亻!
from any-touch.
Related Issues (20)
- 移动端无法滚动 HOT 15
- 【BUG】Vue3 中指令方式设置参数没效果 HOT 2
- 【BUG】Vue3 press 按压事件不触发 HOT 6
- 原生js如何使用
- swipe 很难触发 HOT 1
- vue3指令版的doubletap无效 HOT 1
- @any-touch/pan 怎么动态设置 pointLength 呢 HOT 2
- 父元素监听 panmove, pinch 事件,子元素中 mousedown 不再触发 HOT 2
- 希望能支持在捕获阶段处理事件 HOT 1
- 如何在uniapp 中使用? HOT 2
- canvas 下 绘制的文字如何使用? HOT 1
- 有关 changelog HOT 1
- press 事件是否有按压中以及结束的回调。 HOT 2
- souce map 警告处理下呗
- 不传入el,用catchEvent传入事件的方式,points无法初始化
- pan 事件支持触发的间隔吗?比如:移动指定的像素才触发一次 HOT 2
- 基于any-touch手势库封装的Vue(2 & 3)的指令 HOT 3
- 可以在canvas上使用吗? HOT 4
- 慢速拖动时 panend 有很大几率不触发 HOT 16
- [doc] Add the library compatibility information? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from any-touch.