【问题标题】:Long tap doesn't work on Raspberry Pi touchscreen长按在 Raspberry Pi 触摸屏上不起作用
【发布时间】:2021-01-20 01:04:00
【问题描述】:

我在一个 Angular 应用程序中使用 HammerJS,该应用程序在带有触摸屏的 Raspberry Pi 上的 Electron 中运行。我希望我的用户能够随心所欲地点击(尤其是对于老年人)。 这是我的 Angular 配置:

export class HammerConfig extends HammerGestureConfig {
  options = {
    domEvents: true,
    inputClass: Hammer.MouseInput,
    touchAction: 'auto'
  };
  overrides = {
    swipe: { direction: Hammer.DIRECTION_ALL },
    tap: {
      interval: 0,
      time: 5000
    }
  };
}

在我的理解中,我应该能够点击 5 秒并且仍然触发点击事件。不幸的是,没有任何改变。 我的代码有什么问题?

【问题讨论】:

    标签: angular typescript raspberry-pi3 hammer.js


    【解决方案1】:

    我只是使用touchend 使其工作。 tap 事件对大多数人不起作用。 time 选项对用户体验没有影响。

    【讨论】:

      猜你喜欢
      • 2017-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多