momentum
Add momentum to any DOM element with a simple API. It's like iScroll, except not for scrolling anything. `momentum` also supports mouse and touch events.
Last updated 3 years ago by gdi2290 .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install momentum 
SYNC missed versions from official npm registry.

Momentum Travis

Add momentum to any DOM element with a simple API. It's like iScroll, except not for scrolling anything. momentum also supports mouse and touch events.

const momentum = require('momentum')

// make sure the element is in the document and the document is fully loaded
window.addEventListener('DOMContentLoaded', () => {
  const box = document.querySelector('box')
  momentum(box, (x, y) => {
    console.log('x:', x, 'y:', y)
  })
})

NPM

Current Tags

  • 4.0.0                                ...           latest (3 years ago)

5 Versions

  • 4.0.0                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None

Copyright 2014 - 2017 © taobao.org |