New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gesture-helper

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gesture-helper

a *tiny* touch & mouse library to help make tracking touch interactions more simple.

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gesture-helper

a tiny touch & mouse library to help make tracking touch interactions more simple.

Gesture helper extends https://github.com/asyncly/EventEmitter2, and returns an event emitter. Events can be name spaced, per EventEmitter2. This means that you can bind to the following events:

tap
pan.**
pan.start
pan.end
pan.y.up
pan.y.down
pan.y.**
pan.x.left
pan.x.right
pan.x.**

In the interest of keeping the library small, versatile and uncomplicated, all source touch/mouse events are returned inside EE2 event payloads { sourceEvent: e }. This allows you to add preventDefault() and other native event functionality as you need it.

install:

yarn install gesture-helper

then:

const gestureControl = new GestureHelper(document.querySelector('.el'), { ...options });

optional settings (with default value):

  passive: false,
  capture: false,
  sensitivity: Number(5), // Integer: Px's movement to allow before capturing pan event
  swipeVelocity: Float(0.7), // Float: Velocity threshold range for varied swipe detection
  maxTapDuration: Number(300), // Integer: Milliseconds of finger being on the screen before a tap event is ignored

FAQs

Package last updated on 01 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc