Socket
Socket
Sign inDemoInstall

mouse-pos

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc