Gathering detailed insights and metrics for @egjs/hammerjs
Gathering detailed insights and metrics for @egjs/hammerjs
Gathering detailed insights and metrics for @egjs/hammerjs
Gathering detailed insights and metrics for @egjs/hammerjs
A javascript library for multi-touch gestures :// You can touch this
npm install @egjs/hammerjs
99.4
Supply Chain
100
Quality
82.8
Maintenance
100
Vulnerability
100
License
2.0.17 Release (2019-12-16)
Published on 16 Dec 2019
2.0.16 Release (2019-11-11)
Published on 11 Nov 2019
2.0.15 Release (2019-04-04)
Published on 04 Apr 2019
2.0.14 Release (2018-11-13)
Published on 13 Nov 2018
2.0.13 Release (2018-10-29)
Published on 29 Oct 2018
2.0.12 Release (2018-10-23)
Published on 23 Oct 2018
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
43 Stars
1,243 Commits
11 Forks
20 Watching
6 Branches
8 Contributors
Updated on 17 Sept 2024
JavaScript (81.69%)
HTML (17.89%)
CSS (0.42%)
Cumulative downloads
Total Downloads
Last day
-5.2%
211,695
Compared to previous day
Last week
1.7%
1,177,685
Compared to previous week
Last month
6.7%
4,919,856
Compared to previous month
Last year
40.3%
46,401,792
Compared to previous year
1
29
A JavaScript library for detecting touch gestures.
It seems like that hammer.js
repository is no more activated.
But our library (egjs) has deep dependency to hammer.js for touch interaction. And some pending issues were critical for us to make more light size, compatible with node.js , resolve module crash on umd envrioment.
So we solved following issues that are not resolved in original hammer.js
We would maintain this repository to fix remain bugs and enhance it until original repository activates.
1npm install --save @egjs/hammerjs
or
1yarn add @egjs/hammerjs
or
https://cdnjs.com/libraries/hammer.js/
We did not provide CDN yet. leave the link to original hammerjs as is.
hammer.js has a quick start option for gestures it already recognizes.
1// Get a reference to an element. 2var square = document.querySelector('.square'); 3 4// Create an instance of Hammer with the reference. 5var hammer = new Hammer(square); 6 7// Subscribe to a quick start event: press, tap, or doubletap. 8// For a full list of quick start events, read the documentation. 9hammer.on('press', function(e) { 10 e.target.classList.toggle('expand'); 11 console.log("You're pressing me!"); 12 console.log(e); 13});
If you want to recognize your own gestures, such as tripletap
, then you'll have to use these steps:
1// Get a reference to an element. 2var square = document.querySelector('.square'); 3 4// Create a manager to manage the element. 5var manager = new Hammer.Manager(square); 6 7// Create a recognizer. 8var TripleTap = new Hammer.Tap({ 9 event: 'tripletap', 10 taps: 3 11}); 12 13// Add the recognizer to the manager. 14manager.add(TripleTap); 15 16// Subscribe to the event. 17manager.on('tripletap', function(e) { 18 e.target.classList.toggle('expand'); 19 console.log("You're triple tapping me!"); 20 console.log(e); 21});
For further information regarding hammer.js, please read our documentation.
Feel encouraged to report issues or submit pull requests. When you're ready to do either, read our contribution guidelines. If you're looking for another form of contribution, we love help answering questions on our slack channel.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 5/22 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
89 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More