gpt4 book ai didi

jquery-mobile - 了解 jQuery Mobile Swipe 配置变量

转载 作者:行者123 更新时间:2023-12-03 15:01:26 25 4
gpt4 key购买 nike

我们一直在开发 iPad 应用程序,并使用 jQuery Mobile 来处理诸如滑动(更改页面)之类的事件。在测试应用程序时,很明显 default swipe configuration variables感觉不对。尝试滚动时对滑动过于敏感,反之亦然。

我们已经使用了配置变量,但我们不确定我们是否理解每个配置变量的作用。我们制作了一个图形来帮助我们了解它们是如何协同工作的。我们是正确理解这一点还是遗漏了什么?

jQuery Mobile Swipe Configuration (in the style of Comic Sans)

最佳答案

不确定这是否有帮助,但 jQM 在博客中发布了这个

  • http://blog.jquerymobile.com/2011/08/03/jquery-mobile-beta-2-released/

  • Configurable swipe event thresholds added

    There were a number of hard-coded constants in the jquery.mobile.event.js swipe code. For developers who need to tweak those constants to allow a greater vertical displacement and still register a swipe, this new feature allows them to be adjusted. Thanks to mlitwin for contributing this.

    • scrollSupressionThreshold (default: 10px) – More than this horizontal displacement, and we will suppress scrolling
    • durationThreshold (default: 1000ms) – More time than this, and it isn’t a swipe
    • horizontalDistanceThreshold (default: 30px) – Swipe horizontal displacement must be more than this.
    • verticalDistanceThreshold (default: 75px) – Swipe vertical displacement must be less than this.


    相关问题:
  • Does jQuery preserve touch events properties?
  • How to recognize touch events using jQuery in Safari for iPad? Is it possible?
  • How to get position/coordinates of a tap-event with jquery-mobile?
  • Calculate swipe distance in jQuery-mobile
  • 关于jquery-mobile - 了解 jQuery Mobile Swipe 配置变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9010351/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com