V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
lvfujun
V2EX  ›  问与答

前端有没有测试 touch 滑动速度的框架?

  •  
  •   lvfujun · 2015-06-12 15:57:35 +08:00 · 1925 次点击
    这是一个创建于 3248 天前的主题,其中的信息可能已经有所发展或是发生改变。
    RT.
    比如写轮播想检测用户手指划过的速度.和运动轨迹.
    有没有现成的轮子可以检测.
    没有的话可以......
    5 条回复    2015-06-12 19:13:37 +08:00
    andy12530
        1
    andy12530  
       2015-06-12 16:32:12 +08:00
    自己在touchmove事件里面计算,几行代码。
    lvfujun
        2
    lvfujun  
    OP
       2015-06-12 17:30:33 +08:00
    @andy12530 我打算造个轮子.
    iwege
        3
    iwege  
       2015-06-12 17:37:08 +08:00
    hammer.js 在手势里面有代码,原来有配置是说用户速度到什么速度才触发swipe事件。
    andy12530
        4
    andy12530  
       2015-06-12 18:27:56 +08:00
    @lvfujun 你想造干啥的轮子。
    滑动事件吗,这个轮子都已经一大堆了。
    lvfujun
        5
    lvfujun  
    OP
       2015-06-12 19:13:37 +08:00
    @andy12530 就是滑动事件的轮子.如果有就算了.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   799 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 19ms · UTC 22:07 · PVG 06:07 · LAX 15:07 · JFK 18:07
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.