🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

mouse-pos

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mouse-pos - npm Package Compare versions

Comparing version

to
1.0.2

11

index.js
var Mouse;
module.exports = Mouse = {
getRel: function(e) {
rel: function(e) {
var mouseX, mouseY, rect, target;

@@ -26,3 +26,3 @@ mouseX = e.offsetX;

},
getAbs: function(e) {
abs: function(e) {
var mouseX, mouseY;

@@ -45,3 +45,3 @@ mouseX = e.pageX;

},
getWheelDelta: function(e) {
wheelDelta: function(e) {
var delta, dir;

@@ -54,6 +54,3 @@ delta = [e.deltaX, e.deltaY];

return delta;
},
// legacy stuff
getMouseCoordsScreen: Mouse.getAbs,
getMouseCoords: Mouse.getRel,
}
};
{
"name": "mouse-pos",
"version": "1.0.1",
"version": "1.0.2",
"description": "A simple and lightweight lib to get cross-browser mouse events",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,11 +22,11 @@ mouse-pos

#### getRel(e) - relative to the target
#### rel(e) - relative to the target
`[x,y]`
#### getAbs(e) - absolute to the screen
#### abs(e) - absolute to the screen
`[x,y]`
#### getWheelDelta(e)
#### wheelDelta(e)

@@ -33,0 +33,0 @@ `float` of pixels the mouse wheel moved. Could be negative.