touch-event
    Overview
    Reviews
    Code
    Tutorials
    Playground
    Contributors
    Issues
    Documentation
    Chat

touch-event

Touch events for value-event

1.0.0  •  Updated 4 years ago  •  by Ben Drucker  •  MIT License

Touch events for value-event

Install

$ npm install --save touch-event

Usage

var touchEvent = require('touch-event')
var h = require('virtual-dom/h')

h('div', {
  'ev-touchmove': touchEvent.move(moveHandler)
})

API

touchEvent.start(handler, [data]) -> function

touchEvent.end(handler, [data]) -> function

touchEvent.move(handler, [data]) -> function

touchEvent.cancel(handler, [data]) -> function

handler

Required
Type: function

The handler to call when the element receives the specified touch event.

data

Type: object
Default: {}

Data to pass to the handler when the element is scrolled. This will be extended with an array of touches objects. Touch data will be nested:

[
  {
    client: {x, y}
    //...
  }
]

License

MIT © Ben Drucker

Popularity

Stars
0

Maintenance

Development

Last ver 4 years ago
Created 4 years ago
Last commit 6 months ago
1 year between commits

Technology

Node version: 5.0.0
0 unpacked

Compliance

MIT License
OSI Approved
0 vulnerabilities

Contributors

2 contributors
Ben Drucker
Maintainer, 2 commits, 3 merges
Works at TakeScoop
greenkeeper[bot]
3 commits
greenkeeper
3 PRs

Tags

touch
events
dom
delegator
value-event
virtual-dom
Ready for the next level?
Join Openbase's founding team to help us build the ultimate open-source app store, work with the latest technologies, and enjoy great culture, impact and autonomy
Openbase helps developers choose among and use millions of open-source packages, so they can build amazing products faster.
FacebookLinkedIn
© 2020 Devstore, Inc.