Gathering detailed insights and metrics for @react-jvectormap/jquery-mousewheel
Gathering detailed insights and metrics for @react-jvectormap/jquery-mousewheel
Gathering detailed insights and metrics for @react-jvectormap/jquery-mousewheel
Gathering detailed insights and metrics for @react-jvectormap/jquery-mousewheel
npm install @react-jvectormap/jquery-mousewheel
Typescript
Module System
Node Version
NPM Version
84.4
Supply Chain
86.7
Quality
75.5
Maintenance
100
Vulnerability
99.6
License
JavaScript (52.38%)
HTML (47.62%)
Total Downloads
495,623
Last Day
493
Last Week
4,827
Last Month
28,417
Last Year
298,059
3,903 Stars
192 Commits
1,689 Forks
176 Watching
4 Branches
23 Contributors
Latest Version
1.0.2
Package Id
@react-jvectormap/jquery-mousewheel@1.0.2
Unpacked Size
16.54 kB
Size
6.18 kB
File Count
5
NPM Version
lerna/4.0.0/node@v14.15.0+x64 (darwin)
Node Version
14.15.0
Cumulative downloads
Total Downloads
Last day
-60%
493
Compared to previous day
Last week
-29.8%
4,827
Compared to previous week
Last month
5.7%
28,417
Compared to previous month
Last year
103%
298,059
Compared to previous year
A jQuery plugin that adds cross-browser mouse wheel support with delta normalization.
In order to use the plugin, simply bind the mousewheel
event to an element.
It also provides two helper methods called mousewheel
and unmousewheel
that act just like other event helper methods in jQuery.
The event object is updated with the normalized deltaX
and deltaY
properties.
In addition there is a new property on the event object called deltaFactor
. Multiply
the deltaFactor
by deltaX
or deltaY
to get the scroll distance that the browser
has reported.
Here is an example of using both the bind and helper method syntax:
1// using on 2$('#my_elem').on('mousewheel', function(event) { 3 console.log(event.deltaX, event.deltaY, event.deltaFactor); 4}); 5 6// using the event helper 7$('#my_elem').mousewheel(function(event) { 8 console.log(event.deltaX, event.deltaY, event.deltaFactor); 9});
The old behavior of adding three arguments (delta
, deltaX
, and deltaY
) to the
event handler is now deprecated and will be removed in later releases.
The combination of browsers, operating systems, and devices offer a huge range of possible delta values. In fact if the user uses a trackpad and then a physical mouse wheel the delta values can differ wildly. This plugin normalizes those values so you get a whole number starting at +-1 and going up in increments of +-1 according to the force or acceleration that is used. This number has the potential to be in the thousands depending on the device. Check out some of the data collected from users here.
In some use-cases we prefer to have the normalized delta but in others we want to know how far the browser should
scroll based on the users input. This can be done by multiplying the deltaFactor
by the deltaX
or deltaY
event property to find the scroll distance the browser reported.
The deltaFactor
property was added to the event object in 3.1.5 so that the actual reported delta value can be
extracted. This is a non-standard property.
1$ git clone git@github.com:jquery/jquery-mousewheel.git 2$ cd jquery-mousewheel/ 3$ npm install 4$ npm run build 5$ npm run karma
The unit tests run by karma are very basic sanity checks; improvements welcome. To fully test the plugin, load test/index.html in each supported browser and follow the instructions at the top of the file after the unit tests finish.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
3 existing vulnerabilities detected
Details
Reason
Found 0/3 approved changesets -- score normalized to 0
Reason
1 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
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
Score
Last Scanned on 2024-12-23
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